@kong-ui-public/entities-consumers 4.2.13-pr.2596.f91b74623.0 → 4.2.14-pr.2604.449d9d72a.0
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.
|
@@ -566,8 +566,8 @@ const ce = {
|
|
|
566
566
|
default: l(() => [
|
|
567
567
|
L(y(o(n)("consumers.actions.copy_id")), 1)
|
|
568
568
|
]),
|
|
569
|
-
_:
|
|
570
|
-
},
|
|
569
|
+
_: 1
|
|
570
|
+
}, 8, ["onClick"])
|
|
571
571
|
]),
|
|
572
572
|
_: 2
|
|
573
573
|
}, 1024),
|
|
@@ -580,8 +580,8 @@ const ce = {
|
|
|
580
580
|
default: l(() => [
|
|
581
581
|
L(y(o(n)("consumers.actions.copy_json")), 1)
|
|
582
582
|
]),
|
|
583
|
-
_:
|
|
584
|
-
},
|
|
583
|
+
_: 1
|
|
584
|
+
}, 8, ["onClick"])
|
|
585
585
|
]),
|
|
586
586
|
_: 2
|
|
587
587
|
}, 1024),
|
|
@@ -621,8 +621,8 @@ const ce = {
|
|
|
621
621
|
default: l(() => [
|
|
622
622
|
L(y(e.config.consumerGroupId ? o(n)("consumers.actions.remove") : o(n)("consumers.actions.delete")), 1)
|
|
623
623
|
]),
|
|
624
|
-
_:
|
|
625
|
-
},
|
|
624
|
+
_: 1
|
|
625
|
+
}, 8, ["onClick"])
|
|
626
626
|
]),
|
|
627
627
|
_: 2
|
|
628
628
|
}, 1032, ["auth-function"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E["kong-ui-public-entities-consumers"]={},E.Vue,E.VueRouter,E.KongIcons,E["kong-ui-public-i18n"],E["kong-ui-public-entities-shared"]))})(this,function(E,e,ae,J,ie,u){"use strict";const he={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.",learn_more:"Learn more"},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 Ce(){const t=ie.createI18n("en-us",he);return{i18n:t,i18nT:ie.i18nTComponent(t)}}const X={useI18n:Ce},Q="/v2/control-planes/{controlPlaneId}/core-entities",z="/{workspace}",U={list:{konnect:{all:`${Q}/consumers`,forConsumerGroup:`${Q}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${Q}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${z}/consumers`,forConsumerGroup:`${z}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${z}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{create:`${Q}/consumers`,edit:`${Q}/consumers/{id}`},kongManager:{create:`${z}/consumers`,edit:`${z}/consumers/{id}`}}},be={class:"add-consumer-form-container"},ke={class:"add-consumer-form-cta"},_e={class:"select-item-label"},we={key:0,class:"select-item-desc"},Ve={key:0,class:"kong-ui-entity-add-consumers-error"},Ie={key:0},Ne=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:m}){var y;const{i18n:{t:s}}=X.useI18n(),o=t,k=m,{axiosInstance:r}=u.useAxios((y=o.config)==null?void 0:y.axiosRequestConfig),_=e.ref([]),{debouncedQueryChange:I,loading:B,allRecords:A,error:d,loadItems:j,results:q}=u.useDebouncedFilter(o.config,U.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),P=l=>l,$=e.computed(()=>d.value?s("consumers.errors.general"):""),Y=e.ref(0),K=e.computed(()=>A.value===void 0),O=e.computed(()=>q.value.map(l=>({label:l.username||l.customId,value:l.id,selected:_.value.includes(l.id),data:l}))),F=l=>{var h;const C=K.value?q.value.find(w=>w.id===l):(h=A.value)==null?void 0:h.find(w=>w.id===l);return C?C.username||C.custom_id:l},N=()=>{G.value="",T.value=[],f.value=[],k("cancel")},T=e.ref([]),S=e.ref(!1),G=e.ref(""),L=async()=>{if(!_.value.length){G.value="",f.value=[],k("cancel");return}S.value=!0,G.value="",T.value=[],f.value=[];try{const l=_.value.map(w=>i(w)),C=await Promise.allSettled(l);let h=!0;C.forEach(w=>{w.status!=="fulfilled"&&(h=!1)}),h?(T.value=[],f.value=[],k("add:success",_.value),_.value=[]):(T.value.length&&k("add:partial-success",T.value),_.value=[],D(C))}catch{G.value=s("consumers.errors.add"),k("error",G.value)}finally{S.value=!1}},a=e.computed(()=>{var C,h,w,H;let l=`${o.config.apiBaseUrl}${U.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,((h=o.config)==null?void 0:h.consumerGroupId)||""):o.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((H=o.config)==null?void 0:H.consumerGroupId)||"")),l}),i=async l=>{const C={consumer:l};try{const h=await r.post(a.value,C);return T.value.push(l),h}catch(h){let w=`${F(l)} - ${h.message}`;return h.response.status===409&&(w=`${F(l)} - ${s("consumers.errors.already_added")}`),Promise.reject(Error(w))}},f=e.ref([]),D=l=>{f.value=l.map(C=>{var h;return(h=C.reason)==null?void 0:h.message}).filter(Boolean)};return e.watch(O,()=>{Y.value++},{immediate:!0,deep:!0}),e.watch(()=>o.visible,()=>{o.visible&&j()},{immediate:!0}),(l,C)=>{const h=e.resolveComponent("KMultiselect"),w=e.resolveComponent("KAlert"),H=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(H,{"action-button-disabled":S.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal",title:e.unref(s)("consumers.consumer_groups.add.title"),visible:t.visible,onCancel:N,onProceed:L},{default:e.withCtx(()=>[e.createElementVNode("div",be,[e.createElementVNode("p",ke,e.toDisplayString(e.unref(s)("consumers.consumer_groups.add.ctaText")),1),e.createVNode(h,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=V=>_.value=V),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":K.value?e.unref(s)("consumers.consumer_groups.add.footer"):void 0,items:O.value,label:e.unref(s)("consumers.consumer_groups.add.consumers_label"),loading:e.unref(B),placeholder:e.unref(s)("consumers.consumer_groups.add.consumer_placeholder"),readonly:S.value,required:"",width:"100%",onQueryChange:e.unref(I)},{"item-template":e.withCtx(({item:V})=>[e.createElementVNode("div",_e,e.toDisplayString(V.label),1),P(V).data.username&&P(V).data.custom_id?(e.openBlock(),e.createElementBlock("div",we,e.toDisplayString(P(V).data.custom_id),1)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),G.value||$.value||f.value.length?(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(w,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("consumers.errors.add")),1),f.value.length?(e.openBlock(),e.createElementBlock("ul",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(V,W)=>(e.openBlock(),e.createElementBlock("li",{key:W},e.toDisplayString(V),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString(G.value||$.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),ee=(t,m)=>{const s=t.__vccOpts||t;for(const[o,k]of m)s[o]=k;return s},xe=ee(Ne,[["__scopeId","data-v-d54468ab"]]),Ee={class:"kong-ui-entities-consumers-list"},De={class:"button-row"},Be={class:"empty-state-wrapper"},$e=ee(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}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","add:success","remove:success"],setup(t,{emit:m}){var ge;const s=m,o=t,{i18nT:k,i18n:{t:r}}=X.useI18n(),_=ae.useRouter(),{axiosInstance:I}=u.useAxios((ge=o.config)==null?void 0:ge.axiosRequestConfig),B=e.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),A={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}},d=A,j=n=>({"data-testid":n.username??n.custom_id??n.id}),q=()=>{o.config.consumerGroupId?de():_.push(o.config.createRoute)},P=e.computed(()=>{var c,g,x,M;let n=`${o.config.apiBaseUrl}${U.list[o.config.app][N.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?n=n.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"&&(n=n.replace(/\/{workspace}/gi,(x=o.config)!=null&&x.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((M=o.config)==null?void 0:M.consumerGroupId)||"")),n}),$=e.ref(""),Y=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:A.username,custom_id:A.custom_id},schema:o.config.filterSchema}}),{hasRecords:K,handleStateChange:O}=u.useTableState($),F=e.computed(()=>K.value&&o.config.app==="konnect"),N=e.computed(()=>!!o.config.consumerGroupId),T=e.computed(()=>N.value?"kong-ui-entities-consumers-list-in-group-page":"kong-ui-entities-consumers-list"),S=e.computed(()=>N.value&&!o.config.paginatedEndpoint?"consumers":void 0),{fetcher:G,fetcherState:L,fetcherCacheKey:a}=u.useFetcher(e.computed(()=>({...o.config,cacheIdentifier:o.cacheIdentifier})),P,S),i=()=>{$.value=""},f=()=>{a.value++},D=n=>n??"-",y=e.ref(null),l=async(n,c)=>{const g=n.id;if(!await c(g)){s("copy:error",{entity:n,field:"id",message:r("consumers.errors.copy")});return}s("copy:success",{entity:n,field:"id",message:r("consumers.copy.success",{val:g})})},C=(n,c)=>{const g=JSON.stringify(n);if(!c(g)){s("copy:error",{entity:n,message:r("consumers.errors.copy")});return}s("copy:success",{entity:n,message:r("consumers.copy.success_brief")})},h=async n=>{var g;await((g=o.canRetrieve)==null?void 0:g.call(o,n))&&_.push(o.config.getViewRoute(n.id))},w=n=>({label:r("consumers.actions.view"),to:o.config.getViewRoute(n)}),H=n=>({label:r("consumers.actions.edit"),to:o.config.getEditRoute(n)}),V=e.ref(void 0),W=e.ref(!1),Z=e.ref(!1),ce=e.ref(""),Oe=u.useDeleteUrlBuilder(o.config,P.value),je=n=>{V.value=n,W.value=!0},Le=()=>{W.value=!1},He=async()=>{var n,c,g;if((n=V.value)!=null&&n.id){Z.value=!0;try{await I.delete(Oe(V.value.id)),Z.value=!1,W.value=!1,a.value++,s("delete:success",V.value)}catch(x){ce.value=((g=(c=x.response)==null?void 0:c.data)==null?void 0:g.message)||x.message||r("consumers.errors.delete"),s("error",x)}finally{Z.value=!1}}},oe=e.ref(!1),de=()=>{oe.value=!0},ue=()=>{oe.value=!1},me=(n,c)=>{c||ue(),a.value++,s("add:success",n)},We=()=>{N.value&&de()},R=e.ref(void 0),ne=e.ref(!1),Je=e.ref(""),Qe=n=>{R.value=n,ne.value=!0},pe=()=>{ne.value=!1,R.value=void 0},ze=e.computed(()=>{var c,g,x,M;let n=`${o.config.apiBaseUrl}${U.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,((g=o.config)==null?void 0:g.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(x=o.config)!=null&&x.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((M=o.config)==null?void 0:M.consumerGroupId)||"")),n}),fe=e.ref(!1),Ye=async()=>{if(R.value){fe.value=!0;try{const n=ze.value.replace(/{consumerId}/gi,R.value.id);await I.delete(n),s("remove:success",R.value),pe(),a.value++}catch(n){Je.value=n.message||r("consumers.errors.delete"),s("error",n)}finally{fe.value=!1}}};e.watch(L,n=>{var c,g,x;if(n.status===u.FetcherStatus.Error){y.value={title:r("consumers.errors.general")},(x=(g=(c=n.error)==null?void 0:c.response)==null?void 0:g.data)!=null&&x.message&&(y.value.message=n.error.response.data.message),s("error",n.error);return}y.value=null});const re=e.ref({ctaPath:N.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")}),se=e.ref(!1);return e.onBeforeMount(async()=>{se.value=await o.canCreate(),se.value&&(re.value.title=N.value?r("consumers.list.empty_state.title_for_consumer_group"):r("consumers.list.empty_state.title"),re.value.ctaText=N.value?r("consumers.actions.add_consumer"):r("consumers.actions.create"))}),(n,c)=>{const g=e.resolveComponent("KButton"),x=e.resolveComponent("KEmptyState"),M=e.resolveComponent("KDropdownItem"),ye=e.resolveComponent("KClipboardProvider"),Xe=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":B.value,"empty-state-options":re.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(G),"fetcher-cache-key":e.unref(a),"hide-pagination":N.value&&!t.config.paginatedEndpoint,"pagination-type":"offset","preferences-storage-key":T.value,query:$.value,"row-attributes":j,"table-headers":e.unref(d),onClearSearchInput:i,"onClick:row":c[3]||(c[3]=p=>h(p)),onEmptyStateCtaClicked:We,onSort:f,onState:e.unref(O)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.renderSlot(n.$slots,"toolbar-filter",{},void 0,!0),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(u.EntityFilter),{key:0,modelValue:$.value,"onUpdate:modelValue":c[0]||(c[0]=p=>$.value=p),config:Y.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,[!N.value&&F.value?(e.openBlock(),e.createBlock(g,{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(J.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(g,{appearance:"primary","data-testid":"toolbar-add-consumer",size:t.useActionOutside?"medium":"large",onClick:q},{default:e.withCtx(()=>[e.createVNode(e.unref(J.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(D(p)),1)]),custom_id:e.withCtx(({rowValue:p})=>[e.createTextVNode(e.toDisplayString(D(p)),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(u.TableTags),{tags:p},null,8,["tags"])]),actions:e.withCtx(({row:p})=>[e.createVNode(ye,null,{default:e.withCtx(({copyToClipboard:v})=>[e.createVNode(M,{"data-testid":"action-entity-copy-id",onClick:Ze=>l(p,v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(ye,null,{default:e.withCtx(({copyToClipboard:v})=>[e.createVNode(M,{"data-testid":"action-entity-copy-json",onClick:Ze=>C(p,v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(p)},{default:e.withCtx(()=>[e.createVNode(M,{"data-testid":"action-entity-view","has-divider":"",item:w(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(M,{"data-testid":"action-entity-edit",item:H(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(M,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>t.config.consumerGroupId?Qe(p):je(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},[!$.value&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var p;return[e.createElementVNode("div",Be,[e.renderSlot(n.$slots,"empty-state-toolbar",{},void 0,!0),e.createVNode(x,{"data-testid":t.config.consumerGroupId?"nested-consumers-entity-empty-state":"consumers-entity-empty-state","icon-background":"",message:e.unref(r)("consumers.list.empty_state_v2.description"),title:e.unref(r)("consumers.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(J.TeamIcon),{decorative:""})]),action:e.withCtx(()=>[se.value?(e.openBlock(),e.createBlock(g,{key:0,"data-testid":"entity-create-button",onClick:q},{default:e.withCtx(()=>[e.createVNode(e.unref(J.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:c[2]||(c[2]=v=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(J.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("consumers.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[(p=t.config)!=null&&p.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["data-testid","message","title"])])]}),key:"0"}: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(u.EntityDeleteModal),{"action-button-disabled":Z.value,"data-testid":"delete-consumer-modal",description:e.unref(r)("consumers.delete.description"),"entity-name":V.value&&(V.value.username||V.value.custom_id||V.value.id),"entity-type":e.unref(u.EntityTypes).Consumer,error:ce.value,title:e.unref(r)("consumers.delete.title"),visible:W.value,onCancel:Le,onProceed:He},null,8,["action-button-disabled","description","entity-name","entity-type","error","title","visible"]),t.config.consumerGroupId?(e.openBlock(),e.createBlock(xe,{key:0,config:t.config,"data-testid":"add-consumer-modal",visible:oe.value,"onAdd:partialSuccess":c[4]||(c[4]=p=>me(p,!0)),"onAdd:success":c[5]||(c[5]=p=>me(p)),onCancel:ue},null,8,["config","visible"])):e.createCommentVNode("",!0),t.config.consumerGroupId&&R.value?(e.openBlock(),e.createBlock(Xe,{key:1,"action-button-appearance":"danger","data-testid":"remove-consumer-modal",title:e.unref(r)("consumers.consumer_groups.remove.title"),visible:ne.value,onCancel:pe,onProceed:Ye},{default:e.withCtx(()=>[e.createVNode(e.unref(k),{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-4737bfb9"]]),b=[];for(let t=0;t<256;++t)b.push((t+256).toString(16).slice(1));function Se(t,m=0){return(b[t[m+0]]+b[t[m+1]]+b[t[m+2]]+b[t[m+3]]+"-"+b[t[m+4]]+b[t[m+5]]+"-"+b[t[m+6]]+b[t[m+7]]+"-"+b[t[m+8]]+b[t[m+9]]+"-"+b[t[m+10]]+b[t[m+11]]+b[t[m+12]]+b[t[m+13]]+b[t[m+14]]+b[t[m+15]]).toLowerCase()}let te;const Ge=new Uint8Array(16);function Me(){if(!te){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");te=crypto.getRandomValues.bind(crypto)}return te(Ge)}const le={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Te(t,m,s){var k;if(le.randomUUID&&!t)return le.randomUUID();t=t||{};const o=t.random??((k=t.rng)==null?void 0:k.call(t))??Me();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Se(o)}const Ae={class:"kong-ui-entities-consumer-form"},Re=["id"],Pe={class:"fields-group-text"},Fe=["aria-labelledby"],Ue=ee(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:m}){var L;const s=t,o=m,{i18nT:k,i18n:{t:r}}=X.useI18n(),_=ae.useRouter(),{axiosInstance:I}=u.useAxios((L=s.config)==null?void 0:L.axiosRequestConfig),{getMessageFromError:B}=u.useErrors(),A=Te(),d=e.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),j=e.reactive({username:"",customId:"",tags:""}),q=e.computed(()=>{var a,i;return(i=U.form[(a=s.config)==null?void 0:a.app])==null?void 0:i.edit}),P=()=>{var a;_.push(((a=s.config)==null?void 0:a.cancelRoute)||{name:"consumer-list"})},$=a=>{o("loading",a)},Y=a=>{o("error",a)},K=a=>{var f,D,y;d.fields.username=((f=a==null?void 0:a.item)==null?void 0:f.username)||(a==null?void 0:a.username)||"",d.fields.customId=((D=a==null?void 0:a.item)==null?void 0:D.custom_id)||(a==null?void 0:a.custom_id)||"";const i=((y=a==null?void 0:a.item)==null?void 0:y.tags)||(a==null?void 0:a.tags)||[];d.fields.tags=(i==null?void 0:i.join(", "))||"",Object.assign(j,d.fields)},O=e.computed(()=>s.consumerId?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),F=a=>{var f,D,y,l,C,h;let i=`${(f=s.config)==null?void 0:f.apiBaseUrl}${U.form[(D=s.config)==null?void 0:D.app][a]}`;return((y=s.config)==null?void 0:y.app)==="konnect"?i=i.replace(/{controlPlaneId}/gi,((l=s.config)==null?void 0:l.controlPlaneId)||""):((C=s.config)==null?void 0:C.app)==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(h=s.config)!=null&&h.workspace?`/${s.config.workspace}`:"")),i=i.replace(/{id}/gi,s.consumerId),i},N=e.computed(()=>!!d.fields.username||!!d.fields.customId),T=e.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(j)),S=e.computed(()=>{var a,i;return{username:d.fields.username||null,custom_id:d.fields.customId||null,tags:(i=(a=d.fields.tags.split(","))==null?void 0:a.map(f=>String(f||"").trim()))==null?void 0:i.filter(f=>f!=="")}}),G=async()=>{var a;try{d.readonly=!0;let i;O.value==="create"?i=await I.post(F("create"),S.value):O.value==="edit"&&(i=((a=s.config)==null?void 0:a.app)==="konnect"?await I.put(F("edit"),S.value):await I.patch(F("edit"),S.value)),K(i==null?void 0:i.data),o("update",i==null?void 0:i.data)}catch(i){d.errorMessage=B(i),o("error",i)}finally{d.readonly=!1}};return(a,i)=>{const f=e.resolveComponent("KInput"),D=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(e.unref(u.EntityBaseForm),{"can-submit":N.value&&T.value,config:t.config,"edit-id":t.consumerId,"entity-type":e.unref(u.SupportedEntityType).Consumer,"error-message":d.errorMessage,"fetch-url":q.value,"form-fields":S.value,"is-readonly":d.readonly,onCancel:P,"onFetch:error":i[3]||(i[3]=y=>Y(y)),"onFetch:success":K,onLoading:i[4]||(i[4]=y=>$(y)),onSubmit:G},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(u.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(A)}`,class:"fields-group-title"},e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.title"))+"* ",9,Re),e.createElementVNode("p",Pe,e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.description")),1)]),e.createVNode(D,null,{default:e.withCtx(()=>[e.createElementVNode("fieldset",{"aria-labelledby":`fields-group-title-${e.unref(A)}`},[e.createVNode(f,{modelValue:d.fields.username,"onUpdate:modelValue":i[0]||(i[0]=y=>d.fields.username=y),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:d.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(k),{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:d.fields.customId,"onUpdate:modelValue":i[1]||(i[1]=y=>d.fields.customId=y),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:d.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(k),{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,Fe)]),_:1}),e.createVNode(f,{modelValue:d.fields.tags,"onUpdate:modelValue":i[2]||(i[2]=y=>d.fields.tags=y),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:d.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-ecefc72c"]]),qe={class:"kong-ui-consumer-entity-config-card"},Ke=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 m=t,{i18n:{t:s},i18nT:o}=X.useI18n(),k=e.computed(()=>U.form[m.config.app].edit),r=e.ref({id:{},username:{section:u.ConfigurationSchemaSection.Basic,tooltip:s("consumers.fields.username.tooltip"),order:1},custom_id:{section:u.ConfigurationSchemaSection.Basic,tooltip:s("consumers.fields.custom_id.tooltip"),label:s("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:s("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(_,I)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(e.unref(u.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":r.value,"entity-type":e.unref(u.SupportedEntityType).Consumer,"fetch-url":k.value,"hide-title":t.hideTitle,"onFetch:error":I[0]||(I[0]=B=>_.$emit("fetch:error",B)),"onFetch:success":I[1]||(I[1]=B=>_.$emit("fetch:success",B)),onLoading:I[2]||(I[2]=B=>_.$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(s)("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(s)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});E.ConsumerConfigCard=Ke,E.ConsumerForm=Ue,E.ConsumerList=$e,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E["kong-ui-public-entities-consumers"]={},E.Vue,E.VueRouter,E.KongIcons,E["kong-ui-public-i18n"],E["kong-ui-public-entities-shared"]))})(this,function(E,e,ae,J,ie,u){"use strict";const he={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.",learn_more:"Learn more"},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 Ce(){const t=ie.createI18n("en-us",he);return{i18n:t,i18nT:ie.i18nTComponent(t)}}const X={useI18n:Ce},Q="/v2/control-planes/{controlPlaneId}/core-entities",z="/{workspace}",U={list:{konnect:{all:`${Q}/consumers`,forConsumerGroup:`${Q}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${Q}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${z}/consumers`,forConsumerGroup:`${z}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${z}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{create:`${Q}/consumers`,edit:`${Q}/consumers/{id}`},kongManager:{create:`${z}/consumers`,edit:`${z}/consumers/{id}`}}},be={class:"add-consumer-form-container"},ke={class:"add-consumer-form-cta"},_e={class:"select-item-label"},we={key:0,class:"select-item-desc"},Ve={key:0,class:"kong-ui-entity-add-consumers-error"},Ie={key:0},Ne=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:m}){var y;const{i18n:{t:s}}=X.useI18n(),o=t,k=m,{axiosInstance:r}=u.useAxios((y=o.config)==null?void 0:y.axiosRequestConfig),_=e.ref([]),{debouncedQueryChange:I,loading:B,allRecords:A,error:d,loadItems:j,results:q}=u.useDebouncedFilter(o.config,U.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),P=l=>l,$=e.computed(()=>d.value?s("consumers.errors.general"):""),Y=e.ref(0),K=e.computed(()=>A.value===void 0),O=e.computed(()=>q.value.map(l=>({label:l.username||l.customId,value:l.id,selected:_.value.includes(l.id),data:l}))),F=l=>{var h;const C=K.value?q.value.find(w=>w.id===l):(h=A.value)==null?void 0:h.find(w=>w.id===l);return C?C.username||C.custom_id:l},N=()=>{G.value="",T.value=[],f.value=[],k("cancel")},T=e.ref([]),S=e.ref(!1),G=e.ref(""),L=async()=>{if(!_.value.length){G.value="",f.value=[],k("cancel");return}S.value=!0,G.value="",T.value=[],f.value=[];try{const l=_.value.map(w=>i(w)),C=await Promise.allSettled(l);let h=!0;C.forEach(w=>{w.status!=="fulfilled"&&(h=!1)}),h?(T.value=[],f.value=[],k("add:success",_.value),_.value=[]):(T.value.length&&k("add:partial-success",T.value),_.value=[],D(C))}catch{G.value=s("consumers.errors.add"),k("error",G.value)}finally{S.value=!1}},a=e.computed(()=>{var C,h,w,H;let l=`${o.config.apiBaseUrl}${U.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,((h=o.config)==null?void 0:h.consumerGroupId)||""):o.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(w=o.config)!=null&&w.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((H=o.config)==null?void 0:H.consumerGroupId)||"")),l}),i=async l=>{const C={consumer:l};try{const h=await r.post(a.value,C);return T.value.push(l),h}catch(h){let w=`${F(l)} - ${h.message}`;return h.response.status===409&&(w=`${F(l)} - ${s("consumers.errors.already_added")}`),Promise.reject(Error(w))}},f=e.ref([]),D=l=>{f.value=l.map(C=>{var h;return(h=C.reason)==null?void 0:h.message}).filter(Boolean)};return e.watch(O,()=>{Y.value++},{immediate:!0,deep:!0}),e.watch(()=>o.visible,()=>{o.visible&&j()},{immediate:!0}),(l,C)=>{const h=e.resolveComponent("KMultiselect"),w=e.resolveComponent("KAlert"),H=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(H,{"action-button-disabled":S.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal",title:e.unref(s)("consumers.consumer_groups.add.title"),visible:t.visible,onCancel:N,onProceed:L},{default:e.withCtx(()=>[e.createElementVNode("div",be,[e.createElementVNode("p",ke,e.toDisplayString(e.unref(s)("consumers.consumer_groups.add.ctaText")),1),e.createVNode(h,{modelValue:_.value,"onUpdate:modelValue":C[0]||(C[0]=V=>_.value=V),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":K.value?e.unref(s)("consumers.consumer_groups.add.footer"):void 0,items:O.value,label:e.unref(s)("consumers.consumer_groups.add.consumers_label"),loading:e.unref(B),placeholder:e.unref(s)("consumers.consumer_groups.add.consumer_placeholder"),readonly:S.value,required:"",width:"100%",onQueryChange:e.unref(I)},{"item-template":e.withCtx(({item:V})=>[e.createElementVNode("div",_e,e.toDisplayString(V.label),1),P(V).data.username&&P(V).data.custom_id?(e.openBlock(),e.createElementBlock("div",we,e.toDisplayString(P(V).data.custom_id),1)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),G.value||$.value||f.value.length?(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(w,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("consumers.errors.add")),1),f.value.length?(e.openBlock(),e.createElementBlock("ul",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(V,W)=>(e.openBlock(),e.createElementBlock("li",{key:W},e.toDisplayString(V),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString(G.value||$.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),ee=(t,m)=>{const s=t.__vccOpts||t;for(const[o,k]of m)s[o]=k;return s},xe=ee(Ne,[["__scopeId","data-v-d54468ab"]]),Ee={class:"kong-ui-entities-consumers-list"},De={class:"button-row"},Be={class:"empty-state-wrapper"},$e=ee(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}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","add:success","remove:success"],setup(t,{emit:m}){var ge;const s=m,o=t,{i18nT:k,i18n:{t:r}}=X.useI18n(),_=ae.useRouter(),{axiosInstance:I}=u.useAxios((ge=o.config)==null?void 0:ge.axiosRequestConfig),B=e.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),A={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}},d=A,j=n=>({"data-testid":n.username??n.custom_id??n.id}),q=()=>{o.config.consumerGroupId?de():_.push(o.config.createRoute)},P=e.computed(()=>{var c,g,x,M;let n=`${o.config.apiBaseUrl}${U.list[o.config.app][N.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?n=n.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"&&(n=n.replace(/\/{workspace}/gi,(x=o.config)!=null&&x.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((M=o.config)==null?void 0:M.consumerGroupId)||"")),n}),$=e.ref(""),Y=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:A.username,custom_id:A.custom_id},schema:o.config.filterSchema}}),{hasRecords:K,handleStateChange:O}=u.useTableState($),F=e.computed(()=>K.value&&o.config.app==="konnect"),N=e.computed(()=>!!o.config.consumerGroupId),T=e.computed(()=>N.value?"kong-ui-entities-consumers-list-in-group-page":"kong-ui-entities-consumers-list"),S=e.computed(()=>N.value&&!o.config.paginatedEndpoint?"consumers":void 0),{fetcher:G,fetcherState:L,fetcherCacheKey:a}=u.useFetcher(e.computed(()=>({...o.config,cacheIdentifier:o.cacheIdentifier})),P,S),i=()=>{$.value=""},f=()=>{a.value++},D=n=>n??"-",y=e.ref(null),l=async(n,c)=>{const g=n.id;if(!await c(g)){s("copy:error",{entity:n,field:"id",message:r("consumers.errors.copy")});return}s("copy:success",{entity:n,field:"id",message:r("consumers.copy.success",{val:g})})},C=(n,c)=>{const g=JSON.stringify(n);if(!c(g)){s("copy:error",{entity:n,message:r("consumers.errors.copy")});return}s("copy:success",{entity:n,message:r("consumers.copy.success_brief")})},h=async n=>{var g;await((g=o.canRetrieve)==null?void 0:g.call(o,n))&&_.push(o.config.getViewRoute(n.id))},w=n=>({label:r("consumers.actions.view"),to:o.config.getViewRoute(n)}),H=n=>({label:r("consumers.actions.edit"),to:o.config.getEditRoute(n)}),V=e.ref(void 0),W=e.ref(!1),Z=e.ref(!1),ce=e.ref(""),Oe=u.useDeleteUrlBuilder(o.config,P.value),je=n=>{V.value=n,W.value=!0},Le=()=>{W.value=!1},He=async()=>{var n,c,g;if((n=V.value)!=null&&n.id){Z.value=!0;try{await I.delete(Oe(V.value.id)),Z.value=!1,W.value=!1,a.value++,s("delete:success",V.value)}catch(x){ce.value=((g=(c=x.response)==null?void 0:c.data)==null?void 0:g.message)||x.message||r("consumers.errors.delete"),s("error",x)}finally{Z.value=!1}}},oe=e.ref(!1),de=()=>{oe.value=!0},ue=()=>{oe.value=!1},me=(n,c)=>{c||ue(),a.value++,s("add:success",n)},We=()=>{N.value&&de()},R=e.ref(void 0),ne=e.ref(!1),Je=e.ref(""),Qe=n=>{R.value=n,ne.value=!0},pe=()=>{ne.value=!1,R.value=void 0},ze=e.computed(()=>{var c,g,x,M;let n=`${o.config.apiBaseUrl}${U.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,((g=o.config)==null?void 0:g.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(x=o.config)!=null&&x.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((M=o.config)==null?void 0:M.consumerGroupId)||"")),n}),fe=e.ref(!1),Ye=async()=>{if(R.value){fe.value=!0;try{const n=ze.value.replace(/{consumerId}/gi,R.value.id);await I.delete(n),s("remove:success",R.value),pe(),a.value++}catch(n){Je.value=n.message||r("consumers.errors.delete"),s("error",n)}finally{fe.value=!1}}};e.watch(L,n=>{var c,g,x;if(n.status===u.FetcherStatus.Error){y.value={title:r("consumers.errors.general")},(x=(g=(c=n.error)==null?void 0:c.response)==null?void 0:g.data)!=null&&x.message&&(y.value.message=n.error.response.data.message),s("error",n.error);return}y.value=null});const re=e.ref({ctaPath:N.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")}),se=e.ref(!1);return e.onBeforeMount(async()=>{se.value=await o.canCreate(),se.value&&(re.value.title=N.value?r("consumers.list.empty_state.title_for_consumer_group"):r("consumers.list.empty_state.title"),re.value.ctaText=N.value?r("consumers.actions.add_consumer"):r("consumers.actions.create"))}),(n,c)=>{const g=e.resolveComponent("KButton"),x=e.resolveComponent("KEmptyState"),M=e.resolveComponent("KDropdownItem"),ye=e.resolveComponent("KClipboardProvider"),Xe=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":B.value,"empty-state-options":re.value,"enable-entity-actions":"","error-message":y.value,fetcher:e.unref(G),"fetcher-cache-key":e.unref(a),"hide-pagination":N.value&&!t.config.paginatedEndpoint,"pagination-type":"offset","preferences-storage-key":T.value,query:$.value,"row-attributes":j,"table-headers":e.unref(d),onClearSearchInput:i,"onClick:row":c[3]||(c[3]=p=>h(p)),onEmptyStateCtaClicked:We,onSort:f,onState:e.unref(O)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.renderSlot(n.$slots,"toolbar-filter",{},void 0,!0),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(u.EntityFilter),{key:0,modelValue:$.value,"onUpdate:modelValue":c[0]||(c[0]=p=>$.value=p),config:Y.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,[!N.value&&F.value?(e.openBlock(),e.createBlock(g,{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(J.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(g,{appearance:"primary","data-testid":"toolbar-add-consumer",size:t.useActionOutside?"medium":"large",onClick:q},{default:e.withCtx(()=>[e.createVNode(e.unref(J.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(D(p)),1)]),custom_id:e.withCtx(({rowValue:p})=>[e.createTextVNode(e.toDisplayString(D(p)),1)]),tags:e.withCtx(({rowValue:p})=>[e.createVNode(e.unref(u.TableTags),{tags:p},null,8,["tags"])]),actions:e.withCtx(({row:p})=>[e.createVNode(ye,null,{default:e.withCtx(({copyToClipboard:v})=>[e.createVNode(M,{"data-testid":"action-entity-copy-id",onClick:Ze=>l(p,v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(ye,null,{default:e.withCtx(({copyToClipboard:v})=>[e.createVNode(M,{"data-testid":"action-entity-copy-json",onClick:Ze=>C(p,v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(p)},{default:e.withCtx(()=>[e.createVNode(M,{"data-testid":"action-entity-view","has-divider":"",item:w(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canEdit(p)},{default:e.withCtx(()=>[e.createVNode(M,{"data-testid":"action-entity-edit",item:H(p.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canDelete(p)},{default:e.withCtx(()=>[e.createVNode(M,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>t.config.consumerGroupId?Qe(p):je(p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.config.consumerGroupId?e.unref(r)("consumers.actions.remove"):e.unref(r)("consumers.actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!$.value&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var p;return[e.createElementVNode("div",Be,[e.renderSlot(n.$slots,"empty-state-toolbar",{},void 0,!0),e.createVNode(x,{"data-testid":t.config.consumerGroupId?"nested-consumers-entity-empty-state":"consumers-entity-empty-state","icon-background":"",message:e.unref(r)("consumers.list.empty_state_v2.description"),title:e.unref(r)("consumers.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(J.TeamIcon),{decorative:""})]),action:e.withCtx(()=>[se.value?(e.openBlock(),e.createBlock(g,{key:0,"data-testid":"entity-create-button",onClick:q},{default:e.withCtx(()=>[e.createVNode(e.unref(J.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(g,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:c[2]||(c[2]=v=>n.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(J.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("consumers.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[(p=t.config)!=null&&p.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("consumers.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["data-testid","message","title"])])]}),key:"0"}: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(u.EntityDeleteModal),{"action-button-disabled":Z.value,"data-testid":"delete-consumer-modal",description:e.unref(r)("consumers.delete.description"),"entity-name":V.value&&(V.value.username||V.value.custom_id||V.value.id),"entity-type":e.unref(u.EntityTypes).Consumer,error:ce.value,title:e.unref(r)("consumers.delete.title"),visible:W.value,onCancel:Le,onProceed:He},null,8,["action-button-disabled","description","entity-name","entity-type","error","title","visible"]),t.config.consumerGroupId?(e.openBlock(),e.createBlock(xe,{key:0,config:t.config,"data-testid":"add-consumer-modal",visible:oe.value,"onAdd:partialSuccess":c[4]||(c[4]=p=>me(p,!0)),"onAdd:success":c[5]||(c[5]=p=>me(p)),onCancel:ue},null,8,["config","visible"])):e.createCommentVNode("",!0),t.config.consumerGroupId&&R.value?(e.openBlock(),e.createBlock(Xe,{key:1,"action-button-appearance":"danger","data-testid":"remove-consumer-modal",title:e.unref(r)("consumers.consumer_groups.remove.title"),visible:ne.value,onCancel:pe,onProceed:Ye},{default:e.withCtx(()=>[e.createVNode(e.unref(k),{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-4737bfb9"]]),b=[];for(let t=0;t<256;++t)b.push((t+256).toString(16).slice(1));function Se(t,m=0){return(b[t[m+0]]+b[t[m+1]]+b[t[m+2]]+b[t[m+3]]+"-"+b[t[m+4]]+b[t[m+5]]+"-"+b[t[m+6]]+b[t[m+7]]+"-"+b[t[m+8]]+b[t[m+9]]+"-"+b[t[m+10]]+b[t[m+11]]+b[t[m+12]]+b[t[m+13]]+b[t[m+14]]+b[t[m+15]]).toLowerCase()}let te;const Ge=new Uint8Array(16);function Me(){if(!te){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");te=crypto.getRandomValues.bind(crypto)}return te(Ge)}const le={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Te(t,m,s){var k;if(le.randomUUID&&!t)return le.randomUUID();t=t||{};const o=t.random??((k=t.rng)==null?void 0:k.call(t))??Me();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Se(o)}const Ae={class:"kong-ui-entities-consumer-form"},Re=["id"],Pe={class:"fields-group-text"},Fe=["aria-labelledby"],Ue=ee(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:m}){var L;const s=t,o=m,{i18nT:k,i18n:{t:r}}=X.useI18n(),_=ae.useRouter(),{axiosInstance:I}=u.useAxios((L=s.config)==null?void 0:L.axiosRequestConfig),{getMessageFromError:B}=u.useErrors(),A=Te(),d=e.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),j=e.reactive({username:"",customId:"",tags:""}),q=e.computed(()=>{var a,i;return(i=U.form[(a=s.config)==null?void 0:a.app])==null?void 0:i.edit}),P=()=>{var a;_.push(((a=s.config)==null?void 0:a.cancelRoute)||{name:"consumer-list"})},$=a=>{o("loading",a)},Y=a=>{o("error",a)},K=a=>{var f,D,y;d.fields.username=((f=a==null?void 0:a.item)==null?void 0:f.username)||(a==null?void 0:a.username)||"",d.fields.customId=((D=a==null?void 0:a.item)==null?void 0:D.custom_id)||(a==null?void 0:a.custom_id)||"";const i=((y=a==null?void 0:a.item)==null?void 0:y.tags)||(a==null?void 0:a.tags)||[];d.fields.tags=(i==null?void 0:i.join(", "))||"",Object.assign(j,d.fields)},O=e.computed(()=>s.consumerId?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),F=a=>{var f,D,y,l,C,h;let i=`${(f=s.config)==null?void 0:f.apiBaseUrl}${U.form[(D=s.config)==null?void 0:D.app][a]}`;return((y=s.config)==null?void 0:y.app)==="konnect"?i=i.replace(/{controlPlaneId}/gi,((l=s.config)==null?void 0:l.controlPlaneId)||""):((C=s.config)==null?void 0:C.app)==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(h=s.config)!=null&&h.workspace?`/${s.config.workspace}`:"")),i=i.replace(/{id}/gi,s.consumerId),i},N=e.computed(()=>!!d.fields.username||!!d.fields.customId),T=e.computed(()=>JSON.stringify(d.fields)!==JSON.stringify(j)),S=e.computed(()=>{var a,i;return{username:d.fields.username||null,custom_id:d.fields.customId||null,tags:(i=(a=d.fields.tags.split(","))==null?void 0:a.map(f=>String(f||"").trim()))==null?void 0:i.filter(f=>f!=="")}}),G=async()=>{var a;try{d.readonly=!0;let i;O.value==="create"?i=await I.post(F("create"),S.value):O.value==="edit"&&(i=((a=s.config)==null?void 0:a.app)==="konnect"?await I.put(F("edit"),S.value):await I.patch(F("edit"),S.value)),K(i==null?void 0:i.data),o("update",i==null?void 0:i.data)}catch(i){d.errorMessage=B(i),o("error",i)}finally{d.readonly=!1}};return(a,i)=>{const f=e.resolveComponent("KInput"),D=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(e.unref(u.EntityBaseForm),{"can-submit":N.value&&T.value,config:t.config,"edit-id":t.consumerId,"entity-type":e.unref(u.SupportedEntityType).Consumer,"error-message":d.errorMessage,"fetch-url":q.value,"form-fields":S.value,"is-readonly":d.readonly,onCancel:P,"onFetch:error":i[3]||(i[3]=y=>Y(y)),"onFetch:success":K,onLoading:i[4]||(i[4]=y=>$(y)),onSubmit:G},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(u.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(A)}`,class:"fields-group-title"},e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.title"))+"* ",9,Re),e.createElementVNode("p",Pe,e.toDisplayString(e.unref(r)("consumers.form.consumer_identification.description")),1)]),e.createVNode(D,null,{default:e.withCtx(()=>[e.createElementVNode("fieldset",{"aria-labelledby":`fields-group-title-${e.unref(A)}`},[e.createVNode(f,{modelValue:d.fields.username,"onUpdate:modelValue":i[0]||(i[0]=y=>d.fields.username=y),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:d.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(k),{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:d.fields.customId,"onUpdate:modelValue":i[1]||(i[1]=y=>d.fields.customId=y),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:d.readonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(k),{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,Fe)]),_:1}),e.createVNode(f,{modelValue:d.fields.tags,"onUpdate:modelValue":i[2]||(i[2]=y=>d.fields.tags=y),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:d.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-ecefc72c"]]),qe={class:"kong-ui-consumer-entity-config-card"},Ke=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 m=t,{i18n:{t:s},i18nT:o}=X.useI18n(),k=e.computed(()=>U.form[m.config.app].edit),r=e.ref({id:{},username:{section:u.ConfigurationSchemaSection.Basic,tooltip:s("consumers.fields.username.tooltip"),order:1},custom_id:{section:u.ConfigurationSchemaSection.Basic,tooltip:s("consumers.fields.custom_id.tooltip"),label:s("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:s("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(_,I)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(e.unref(u.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":r.value,"entity-type":e.unref(u.SupportedEntityType).Consumer,"fetch-url":k.value,"hide-title":t.hideTitle,"onFetch:error":I[0]||(I[0]=B=>_.$emit("fetch:error",B)),"onFetch:success":I[1]||(I[1]=B=>_.$emit("fetch:success",B)),onLoading:I[2]||(I[2]=B=>_.$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(s)("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(s)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}});E.ConsumerConfigCard=Ke,E.ConsumerForm=Ue,E.ConsumerList=$e,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{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-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-66d61bea]{align-items:center;border-bottom:var(--70f369b3);box-sizing:border-box;display:var(--67c2fae6);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-66d61bea]{box-sizing:border-box;padding-right:16px;width:var(--847b138c)}.config-card-details-row .config-card-details-label label[data-v-66d61bea]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-66d61bea]{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-66d61bea]{min-width:0}.config-card-details-row .config-card-details-value[data-v-66d61bea]{box-sizing:border-box;width:var(--847687d6)}.config-card-details-row .config-card-details-value .truncated[data-v-66d61bea]{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-66d61bea]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-66d61bea] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-66d61bea]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-66d61bea]{margin-right:4px}.config-card-details-row[data-v-66d61bea] .k-label{margin-bottom:0}.config-card-details-row[data-v-66d61bea] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-66d61bea] .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(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-f11c7e34]{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-8dc3c29c]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-8dc3c29c]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-8dc3c29c]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-8dc3c29c] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-8dc3c29c]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-520de902]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-520de902] .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-520de902] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-520de902] .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-520de902] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-520de902]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-520de902] .k-button:last-of-type,.form-actions[data-v-520de902] .k-button:nth-last-of-type(2){margin-inline-start:16px}.form-actions-reverted[data-v-520de902]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-44153100]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-44153100]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-44153100]{display:none}.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-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{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-084f7978]{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-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{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}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.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-645aae54]{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-645aae54]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-645aae54]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-645aae54]{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-645aae54]{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-645aae54]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{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-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-645aae54]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-645aae54]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-645aae54]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{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-645aae54]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54]{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-645aae54]{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-645aae54] .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-645aae54] .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-645aae54] .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-645aae54]{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-645aae54]{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-4737bfb9]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumers-list[data-v-4737bfb9]{width:100%}.kong-ui-entities-consumers-list .empty-state-wrapper[data-v-4737bfb9]{display:flex;flex-direction:column;gap:4px;padding:4px 4px 0}.kong-ui-entities-consumers-list .message[data-v-4737bfb9]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-4737bfb9]{margin-right:12px}.kong-ui-entities-consumer-form[data-v-ecefc72c]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-form[data-v-ecefc72c] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-form fieldset[data-v-ecefc72c]{border:none;margin:0;padding:0}.fields-group-title[data-v-ecefc72c]{color:#232633;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-ecefc72c]{color:#00000073;font-size:14px;line-height:20px;margin-bottom:0;margin-top:0}.username-field[data-v-ecefc72c]{margin-bottom:16px}
|
|
1
|
+
.config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{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-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-66d61bea]{align-items:center;border-bottom:var(--v70f369b3);box-sizing:border-box;display:var(--v67c2fae6);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-66d61bea]{box-sizing:border-box;padding-right:16px;width:var(--v847b138c)}.config-card-details-row .config-card-details-label label[data-v-66d61bea]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-66d61bea]{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-66d61bea]{min-width:0}.config-card-details-row .config-card-details-value[data-v-66d61bea]{box-sizing:border-box;width:var(--v847687d6)}.config-card-details-row .config-card-details-value .truncated[data-v-66d61bea]{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-66d61bea]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-66d61bea] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-66d61bea]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-66d61bea]{margin-right:4px}.config-card-details-row[data-v-66d61bea] .k-label{margin-bottom:0}.config-card-details-row[data-v-66d61bea] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-66d61bea] .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(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-f11c7e34]{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-8dc3c29c]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-8dc3c29c]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-8dc3c29c]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-8dc3c29c] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-8dc3c29c]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-520de902]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-520de902] .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-520de902] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-520de902] .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-520de902] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-520de902]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-520de902] .k-button:last-of-type,.form-actions[data-v-520de902] .k-button:nth-last-of-type(2){margin-inline-start:16px}.form-actions-reverted[data-v-520de902]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-44153100]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-44153100]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-44153100]{display:none}.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-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{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-084f7978]{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-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{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}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.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-645aae54]{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-645aae54]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-645aae54]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-645aae54]{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-645aae54]{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-645aae54]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{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-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-645aae54]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-645aae54]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-645aae54]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{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-645aae54]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54]{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-645aae54]{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-645aae54] .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-645aae54] .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-645aae54] .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-645aae54]{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-645aae54]{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-4737bfb9]{align-items:center;display:flex;gap:12px}.kong-ui-entities-consumers-list[data-v-4737bfb9]{width:100%}.kong-ui-entities-consumers-list .empty-state-wrapper[data-v-4737bfb9]{display:flex;flex-direction:column;gap:4px;padding:4px 4px 0}.kong-ui-entities-consumers-list .message[data-v-4737bfb9]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-4737bfb9]{margin-right:12px}.kong-ui-entities-consumer-form[data-v-ecefc72c]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-form[data-v-ecefc72c] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-form fieldset[data-v-ecefc72c]{border:none;margin:0;padding:0}.fields-group-title[data-v-ecefc72c]{color:#232633;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-ecefc72c]{color:#00000073;font-size:14px;line-height:20px;margin-bottom:0;margin-top:0}.username-field[data-v-ecefc72c]{margin-bottom:16px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-consumers",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14-pr.2604.449d9d72a.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-consumers.umd.js",
|
|
6
6
|
"module": "./dist/entities-consumers.es.js",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
29
|
"@kong-ui-public/i18n": "^2.4.4",
|
|
30
|
-
"@kong-ui-public/entities-shared": "^3.32.
|
|
30
|
+
"@kong-ui-public/entities-shared": "^3.32.4-pr.2604.449d9d72a.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@kong/design-tokens": "1.18.0",
|
|
34
34
|
"@kong/icons": "^1.39.0",
|
|
35
35
|
"@kong/kongponents": "9.43.2",
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
|
-
"vue": "^3.5.
|
|
37
|
+
"vue": "^3.5.22",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/entities-shared": "^3.32.
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.32.4-pr.2604.449d9d72a.0",
|
|
40
40
|
"@kong-ui-public/i18n": "^2.4.4"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|