@kong-ui-public/entities-consumers 3.5.0 → 3.5.1
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.
|
@@ -831,9 +831,7 @@ const St = { class: "kong-ui-entities-consumer-form" }, xt = ["id"], Dt = { clas
|
|
|
831
831
|
class: "username-field",
|
|
832
832
|
"data-testid": "consumer-form-username",
|
|
833
833
|
label: s(r)("consumers.fields.username.label"),
|
|
834
|
-
"label-attributes": {
|
|
835
|
-
tooltipAttributes: { maxWidth: "250" }
|
|
836
|
-
},
|
|
834
|
+
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
837
835
|
placeholder: s(r)("consumers.fields.username.placeholder"),
|
|
838
836
|
readonly: p.readonly,
|
|
839
837
|
type: "text"
|
|
@@ -858,9 +856,7 @@ const St = { class: "kong-ui-entities-consumer-form" }, xt = ["id"], Dt = { clas
|
|
|
858
856
|
autocomplete: "off",
|
|
859
857
|
"data-testid": "consumer-form-custom-id",
|
|
860
858
|
label: s(r)("consumers.fields.custom_id.label"),
|
|
861
|
-
"label-attributes": {
|
|
862
|
-
tooltipAttributes: { maxWidth: "250" }
|
|
863
|
-
},
|
|
859
|
+
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
864
860
|
placeholder: s(r)("consumers.fields.custom_id.placeholder"),
|
|
865
861
|
readonly: p.readonly,
|
|
866
862
|
type: "text"
|
|
@@ -892,7 +888,7 @@ const St = { class: "kong-ui-entities-consumer-form" }, xt = ["id"], Dt = { clas
|
|
|
892
888
|
label: s(r)("consumers.fields.tags.label"),
|
|
893
889
|
"label-attributes": {
|
|
894
890
|
info: s(r)("consumers.fields.tags.tooltip"),
|
|
895
|
-
tooltipAttributes: { maxWidth: "
|
|
891
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
896
892
|
},
|
|
897
893
|
placeholder: s(r)("consumers.fields.tags.placeholder"),
|
|
898
894
|
readonly: p.readonly,
|
|
@@ -908,7 +904,7 @@ const St = { class: "kong-ui-entities-consumer-form" }, xt = ["id"], Dt = { clas
|
|
|
908
904
|
]);
|
|
909
905
|
};
|
|
910
906
|
}
|
|
911
|
-
}), qt = /* @__PURE__ */ ye(Rt, [["__scopeId", "data-v-
|
|
907
|
+
}), qt = /* @__PURE__ */ ye(Rt, [["__scopeId", "data-v-5973c664"]]), Tt = { class: "kong-ui-consumer-entity-config-card" }, Nt = /* @__PURE__ */ ue({
|
|
912
908
|
__name: "ConsumerConfigCard",
|
|
913
909
|
props: {
|
|
914
910
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -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,re,ge,se,f){"use strict";const ye={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"},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. 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 he(){const t=se.createI18n("en-us",ye);return{i18n:t,i18nT:se.i18nTComponent(t)}}const X={useI18n:he},j="/v2/control-planes/{controlPlaneId}/core-entities",L="/{workspace}",P={list:{konnect:{all:`${j}/consumers`,forConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${L}/consumers`,forConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${j}/v1/schemas/json/consumer/validate`,create:`${j}/consumers`,edit:`${j}/consumers/{id}`},kongManager:{validate:`${L}/schemas/consumers/validate`,create:`${L}/consumers`,edit:`${L}/consumers/{id}`}}},Ce={class:"add-consumer-form-container"},be={class:"add-consumer-form-cta"},ke={class:"select-item-label"},_e={key:0,class:"select-item-desc"},Ie={key:0,class:"kong-ui-entity-add-consumers-error"},we={key:0},Ve=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:c}){var C;const{i18n:{t:r}}=X.useI18n(),o=t,k=c,{axiosInstance:s}=f.useAxios((C=o.config)==null?void 0:C.axiosRequestConfig),I=e.ref([]),{debouncedQueryChange:w,loading:V,allRecords:x,error:u,loadItems:W,results:R}=f.useDebouncedFilter(o.config,P.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),U=l=>l,H=e.computed(()=>u.value?r("consumers.errors.general"):""),J=e.ref(0),M=e.computed(()=>x.value===void 0),K=e.computed(()=>R.value.map(l=>({label:l.username||l.customId,value:l.id,selected:I.value.includes(l.id),data:l}))),A=l=>{var p;const m=M.value?R.value.find(b=>b.id===l):(p=x.value)==null?void 0:p.find(b=>b.id===l);return m?m.username||m.custom_id:l},Y=()=>{D.value="",G.value=[],y.value=[],k("cancel")},G=e.ref([]),B=e.ref(!1),D=e.ref(""),q=async()=>{if(!I.value.length){D.value="",y.value=[],k("cancel");return}B.value=!0,D.value="",G.value=[],y.value=[];try{const l=I.value.map(b=>i(b)),m=await Promise.allSettled(l);let p=!0;m.forEach(b=>{b.status!=="fulfilled"&&(p=!1)}),p?(G.value=[],y.value=[],k("add:success",I.value),I.value=[]):(G.value.length&&k("add:partial-success",G.value),I.value=[],$(m))}catch{D.value=r("consumers.errors.add"),k("error",D.value)}finally{B.value=!1}},a=e.computed(()=>{var m,p,b,O;let l=`${o.config.apiBaseUrl}${P.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((m=o.config)==null?void 0:m.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((p=o.config)==null?void 0:p.consumerGroupId)||""):o.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(b=o.config)!=null&&b.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((O=o.config)==null?void 0:O.consumerGroupId)||"")),l}),i=async l=>{const m={consumer:l};try{const p=await s.post(a.value,m);return G.value.push(l),p}catch(p){let b=`${A(l)} - ${p.message}`;return p.response.status===409&&(b=`${A(l)} - ${r("consumers.errors.already_added")}`),Promise.reject(Error(b))}},y=e.ref([]),$=l=>{y.value=l.map(m=>{var p;return(p=m.reason)==null?void 0:p.message}).filter(Boolean)};return e.watch(K,()=>{J.value++},{immediate:!0,deep:!0}),e.watch(()=>o.visible,()=>{o.visible&&W()},{immediate:!0}),(l,m)=>{const p=e.resolveComponent("KMultiselect"),b=e.resolveComponent("KAlert"),O=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(O,{"action-button-disabled":B.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal",title:e.unref(r)("consumers.consumer_groups.add.title"),visible:t.visible,onCancel:Y,onProceed:q},{default:e.withCtx(()=>[e.createElementVNode("div",Ce,[e.createElementVNode("p",be,e.toDisplayString(e.unref(r)("consumers.consumer_groups.add.ctaText")),1),e.createVNode(p,{modelValue:I.value,"onUpdate:modelValue":m[0]||(m[0]=T=>I.value=T),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":M.value?e.unref(r)("consumers.consumer_groups.add.footer"):void 0,items:K.value,label:e.unref(r)("consumers.consumer_groups.add.consumers_label"),loading:e.unref(V),placeholder:e.unref(r)("consumers.consumer_groups.add.consumer_placeholder"),readonly:B.value,required:"",width:"100%",onQueryChange:e.unref(w)},{"item-template":e.withCtx(({item:T})=>[e.createElementVNode("div",ke,e.toDisplayString(T.label),1),U(T).data.username&&U(T).data.custom_id?(e.openBlock(),e.createElementBlock("div",_e,e.toDisplayString(U(T).data.custom_id),1)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),D.value||H.value||y.value.length?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(b,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("consumers.errors.add")),1),y.value.length?(e.openBlock(),e.createElementBlock("ul",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(T,ee)=>(e.openBlock(),e.createElementBlock("li",{key:ee},e.toDisplayString(T),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString(D.value||H.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),v=(t,c)=>{const r=t.__vccOpts||t;for(const[o,k]of c)r[o]=k;return r},xe=v(Ve,[["__scopeId","data-v-d54468ab"]]),Ne={class:"kong-ui-entities-consumers-list"},Ee={key:1},Be=v(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","copy:success","copy:error","delete:success","add:success","remove:success"],setup(t,{emit:c}){var pe;const r=c,o=t,{i18nT:k,i18n:{t:s}}=X.useI18n(),I=re.useRouter(),{axiosInstance:w}=f.useAxios((pe=o.config)==null?void 0:pe.axiosRequestConfig),V=e.ref(1),x=e.computed(()=>!!o.config.consumerGroupId),u=e.computed(()=>x.value?"kong-ui-entities-consumers-list-in-group-page":"kong-ui-entities-consumers-list"),W=e.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),R={username:{label:s("consumers.list.table_headers.username"),searchable:!0,sortable:!0,hidable:!1},custom_id:{label:s("consumers.list.table_headers.custom_id"),searchable:!0,sortable:!0},tags:{label:s("consumers.list.table_headers.tags"),sortable:!1}},U=R,H=n=>({"data-testid":n.username??n.custom_id??n.id}),J=e.computed(()=>{var d,h,N,S;let n=`${o.config.apiBaseUrl}${P.list[o.config.app][x.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((d=o.config)==null?void 0:d.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((h=o.config)==null?void 0:h.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(N=o.config)!=null&&N.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((S=o.config)==null?void 0:S.consumerGroupId)||"")),n}),M=e.ref(""),K=e.computed(()=>{const n=o.config.app==="konnect"||o.config.isExactMatch;return n?{isExactMatch:n,placeholder:s(`consumers.search.placeholder.${o.config.app}`)}:{isExactMatch:n,fields:{username:R.username,custom_id:R.custom_id},schema:o.config.filterSchema}}),A=e.computed(()=>x.value&&!o.config.paginatedEndpoint?"consumers":void 0),{fetcher:Y,fetcherState:G}=f.useFetcher(o.config,J.value,A.value),B=()=>{M.value=""},D=()=>{V.value++},q=n=>n??"-",a=e.ref(null),i=(n,d)=>{const h=n.id;if(!d(h)){r("copy:error",{entity:n,field:"id",message:s("consumers.errors.copy")});return}r("copy:success",{entity:n,field:"id",message:s("consumers.copy.success",{val:h})})},y=(n,d)=>{const h=JSON.stringify(n);if(!d(h)){r("copy:error",{entity:n,message:s("consumers.errors.copy")});return}r("copy:success",{entity:n,message:s("consumers.copy.success_brief")})},$=async n=>{var h;await((h=o.canRetrieve)==null?void 0:h.call(o,n))&&I.push(o.config.getViewRoute(n.id))},C=n=>({label:s("consumers.actions.view"),to:o.config.getViewRoute(n)}),l=n=>({label:s("consumers.actions.edit"),to:o.config.getEditRoute(n)}),m=e.ref(void 0),p=e.ref(!1),b=e.ref(!1),O=e.ref(""),T=f.useDeleteUrlBuilder(o.config,J.value),ee=n=>{m.value=n,p.value=!0},Ke=()=>{p.value=!1},qe=async()=>{var n,d,h;if((n=m.value)!=null&&n.id){b.value=!0;try{await w.delete(T(m.value.id)),b.value=!1,p.value=!1,V.value++,r("delete:success",m.value)}catch(N){O.value=((h=(d=N.response)==null?void 0:d.data)==null?void 0:h.message)||N.message||s("consumers.errors.delete"),r("error",N)}finally{b.value=!1}}},te=e.ref(!1),ie=()=>{te.value=!0},le=()=>{te.value=!1},ce=(n,d)=>{d||le(),V.value++,r("add:success",n)},Oe=()=>{x.value&&ie()},F=e.ref(void 0),oe=e.ref(!1),je=e.ref(""),Le=n=>{F.value=n,oe.value=!0},de=()=>{oe.value=!1,F.value=void 0},We=e.computed(()=>{var d,h,N,S;let n=`${o.config.apiBaseUrl}${P.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((d=o.config)==null?void 0:d.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((h=o.config)==null?void 0:h.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(N=o.config)!=null&&N.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((S=o.config)==null?void 0:S.consumerGroupId)||"")),n}),ue=e.ref(!1),He=async()=>{if(F.value){ue.value=!0;try{const n=We.value.replace(/{consumerId}/gi,F.value.id);await w.delete(n),r("remove:success",F.value),de(),V.value++}catch(n){je.value=n.message||s("consumers.errors.delete"),r("error",n)}finally{ue.value=!1}}},me=e.ref(!1);e.watch(G,n=>{var d,h,N,S;if(Array.isArray((d=n==null?void 0:n.response)==null?void 0:d.data)&&(me.value=n.response.data.length>0),n.status===f.FetcherStatus.Error){a.value={title:s("consumers.errors.general")},(S=(N=(h=n.error)==null?void 0:h.response)==null?void 0:N.data)!=null&&S.message&&(a.value.message=n.error.response.data.message),r("error",n.error);return}a.value=null});const ne=e.ref({ctaPath:x.value?void 0:o.config.createRoute,ctaText:void 0,message:`${s("consumers.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:s("consumers.title")});return e.onBeforeMount(async()=>{await o.canCreate()&&(ne.value.title=x.value?s("consumers.list.empty_state.title_for_consumer_group"):s("consumers.list.empty_state.title"),ne.value.ctaText=x.value?s("consumers.actions.add_consumer"):s("consumers.actions.create"))}),(n,d)=>{const h=e.resolveComponent("KButton"),N=e.resolveComponent("KBadge"),S=e.resolveComponent("KTruncate"),z=e.resolveComponent("KDropdownItem"),fe=e.resolveComponent("KClipboardProvider"),Je=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(f.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-pagination":x.value&&!t.config.paginatedEndpoint,"disable-pagination-page-jump":"","disable-sorting":W.value,"empty-state-options":ne.value,"enable-entity-actions":"","error-message":a.value,fetcher:e.unref(Y),"fetcher-cache-key":V.value,"pagination-type":"offset","preferences-storage-key":u.value,query:M.value,"row-attributes":H,"table-headers":e.unref(U),"use-action-outside":t.useActionOutside,onClearSearchInput:B,"onClick:row":d[3]||(d[3]=g=>$(g)),onEmptyStateCtaClicked:Oe,onSort:D},{"toolbar-filter":e.withCtx(()=>[x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(f.EntityFilter),{key:0,modelValue:M.value,"onUpdate:modelValue":d[0]||(d[0]=g=>M.value=g),config:K.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.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(h,{appearance:"primary","data-testid":"toolbar-add-consumer",size:"large",to:t.config.consumerGroupId?void 0:t.config.createRoute,onClick:d[1]||(d[1]=()=>t.config.consumerGroupId?ie():void 0)},{default:e.withCtx(()=>[e.createVNode(e.unref(ge.AddIcon)),e.createTextVNode(" "+e.toDisplayString(t.config.consumerGroupId?e.unref(s)("consumers.actions.add_consumer"):e.unref(s)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1},8,["to"]),[[e.vShow,me.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),username:e.withCtx(({rowValue:g})=>[e.createElementVNode("b",null,e.toDisplayString(q(g)),1)]),custom_id:e.withCtx(({rowValue:g})=>[e.createTextVNode(e.toDisplayString(q(g)),1)]),tags:e.withCtx(({rowValue:g})=>[g&&g.length>0?(e.openBlock(),e.createBlock(S,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g,Q=>(e.openBlock(),e.createBlock(N,{key:Q,onClick:d[2]||(d[2]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Q),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",Ee,"-"))]),actions:e.withCtx(({row:g})=>[e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:Q})=>[e.createVNode(z,{"data-testid":"action-entity-copy-id",onClick:Qe=>i(g,Q)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("consumers.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:Q})=>[e.createVNode(z,{"data-testid":"action-entity-copy-json",onClick:Qe=>y(g,Q)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("consumers.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(g)},{default:e.withCtx(()=>[e.createVNode(z,{"data-testid":"action-entity-view","has-divider":"",item:C(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canEdit(g)},{default:e.withCtx(()=>[e.createVNode(z,{"data-testid":"action-entity-edit",item:l(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canDelete(g)},{default:e.withCtx(()=>[e.createVNode(z,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>t.config.consumerGroupId?Le(g):ee(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.config.consumerGroupId?e.unref(s)("consumers.actions.remove"):e.unref(s)("consumers.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-pagination","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","preferences-storage-key","query","table-headers","use-action-outside"]),e.createVNode(e.unref(f.EntityDeleteModal),{"action-button-disabled":b.value,"data-testid":"delete-consumer-modal",description:e.unref(s)("consumers.delete.description"),"entity-name":m.value&&(m.value.username||m.value.custom_id||m.value.id),"entity-type":e.unref(f.EntityTypes).Consumer,error:O.value,title:e.unref(s)("consumers.delete.title"),visible:p.value,onCancel:Ke,onProceed:qe},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:te.value,"onAdd:partialSuccess":d[4]||(d[4]=g=>ce(g,!0)),"onAdd:success":d[5]||(d[5]=g=>ce(g)),onCancel:le},null,8,["config","visible"])):e.createCommentVNode("",!0),t.config.consumerGroupId&&F.value?(e.openBlock(),e.createBlock(Je,{key:1,"action-button-appearance":"danger","data-testid":"remove-consumer-modal",title:e.unref(s)("consumers.consumer_groups.remove.title"),visible:oe.value,onCancel:de,onProceed:He},{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(F.value.username||F.value.custom_id||F.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(s)("consumers.consumer_groups.remove.description")),1)]),_:1},8,["title","visible"])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-9a998e6f"]]);let Z;const De=new Uint8Array(16);function $e(){if(!Z&&(Z=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Z))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(De)}const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function Me(t,c=0){return _[t[c+0]]+_[t[c+1]]+_[t[c+2]]+_[t[c+3]]+"-"+_[t[c+4]]+_[t[c+5]]+"-"+_[t[c+6]]+_[t[c+7]]+"-"+_[t[c+8]]+_[t[c+9]]+"-"+_[t[c+10]]+_[t[c+11]]+_[t[c+12]]+_[t[c+13]]+_[t[c+14]]+_[t[c+15]]}const ae={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ge(t,c,r){if(ae.randomUUID&&!c&&!t)return ae.randomUUID();t=t||{};const o=t.random||(t.rng||$e)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,c){r=r||0;for(let k=0;k<16;++k)c[r+k]=o[k];return c}return Me(o)}const Te={class:"kong-ui-entities-consumer-form"},Se=["id"],Ae={class:"fields-group-text"},Fe=["aria-labelledby"],Re=v(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:""},enableTerraform:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(t,{emit:c}){var q;const r=t,o=c,{i18nT:k,i18n:{t:s}}=X.useI18n(),I=re.useRouter(),{axiosInstance:w}=f.useAxios((q=r.config)==null?void 0:q.axiosRequestConfig),{getMessageFromError:V}=f.useErrors(),x=Ge(),u=e.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),W=e.reactive({username:"",customId:"",tags:""}),R=e.computed(()=>{var a,i;return(i=P.form[(a=r.config)==null?void 0:a.app])==null?void 0:i.edit}),U=()=>{var a;I.push(((a=r.config)==null?void 0:a.cancelRoute)||{name:"consumer-list"})},H=a=>{o("loading",a)},J=a=>{o("error",a)},M=a=>{var y,$,C;u.fields.username=((y=a==null?void 0:a.item)==null?void 0:y.username)||(a==null?void 0:a.username)||"",u.fields.customId=(($=a==null?void 0:a.item)==null?void 0:$.custom_id)||(a==null?void 0:a.custom_id)||"";const i=((C=a==null?void 0:a.item)==null?void 0:C.tags)||(a==null?void 0:a.tags)||[];u.fields.tags=(i==null?void 0:i.join(", "))||"",Object.assign(W,u.fields)},K=e.computed(()=>r.consumerId?f.EntityBaseFormType.Edit:f.EntityBaseFormType.Create),A=a=>{var y,$,C,l,m,p;let i=`${(y=r.config)==null?void 0:y.apiBaseUrl}${P.form[($=r.config)==null?void 0:$.app][a]}`;return((C=r.config)==null?void 0:C.app)==="konnect"?i=i.replace(/{controlPlaneId}/gi,((l=r.config)==null?void 0:l.controlPlaneId)||""):((m=r.config)==null?void 0:m.app)==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(p=r.config)!=null&&p.workspace?`/${r.config.workspace}`:"")),i=i.replace(/{id}/gi,r.consumerId),i},Y=e.computed(()=>!!u.fields.username||!!u.fields.customId),G=e.computed(()=>JSON.stringify(u.fields)!==JSON.stringify(W)),B=e.computed(()=>{var a,i;return{username:u.fields.username||null,custom_id:u.fields.customId||null,tags:(i=(a=u.fields.tags.split(","))==null?void 0:a.map(y=>String(y||"").trim()))==null?void 0:i.filter(y=>y!=="")}}),D=async()=>{var a;try{u.readonly=!0;let i;await w.post(A("validate"),B.value),K.value==="create"?i=await w.post(A("create"),B.value):K.value==="edit"&&(i=((a=r.config)==null?void 0:a.app)==="konnect"?await w.put(A("edit"),B.value):await w.patch(A("edit"),B.value)),M(i==null?void 0:i.data),o("update",i==null?void 0:i.data)}catch(i){u.errorMessage=V(i),o("error",i)}finally{u.readonly=!1}};return(a,i)=>{const y=e.resolveComponent("KInput"),$=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(e.unref(f.EntityBaseForm),{"can-submit":Y.value&&G.value,config:t.config,"edit-id":t.consumerId,"enable-terraform":t.enableTerraform,"entity-type":e.unref(f.SupportedEntityType).Consumer,"error-message":u.errorMessage,"fetch-url":R.value,"form-fields":B.value,"is-readonly":u.readonly,onCancel:U,"onFetch:error":i[3]||(i[3]=C=>J(C)),"onFetch:success":M,onLoading:i[4]||(i[4]=C=>H(C)),onSubmit:D},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(f.EntityFormSection),{description:e.unref(s)("consumers.form.info.description"),"has-divider":"",title:e.unref(s)("consumers.form.info.title")},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("h3",{id:`fields-group-title-${e.unref(x)}`,class:"fields-group-title"},e.toDisplayString(e.unref(s)("consumers.form.consumer_identification.title"))+"* ",9,Se),e.createElementVNode("p",Ae,e.toDisplayString(e.unref(s)("consumers.form.consumer_identification.description")),1)]),e.createVNode($,null,{default:e.withCtx(()=>[e.createElementVNode("fieldset",{"aria-labelledby":`fields-group-title-${e.unref(x)}`},[e.createVNode(y,{modelValue:u.fields.username,"onUpdate:modelValue":i[0]||(i[0]=C=>u.fields.username=C),modelModifiers:{trim:!0},autocomplete:"off",class:"username-field","data-testid":"consumer-form-username",label:e.unref(s)("consumers.fields.username.label"),"label-attributes":{tooltipAttributes:{maxWidth:"250"}},placeholder:e.unref(s)("consumers.fields.username.placeholder"),readonly:u.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(s)("consumers.fields.username.custom_id")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),e.createVNode(y,{modelValue:u.fields.customId,"onUpdate:modelValue":i[1]||(i[1]=C=>u.fields.customId=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-custom-id",label:e.unref(s)("consumers.fields.custom_id.label"),"label-attributes":{tooltipAttributes:{maxWidth:"250"}},placeholder:e.unref(s)("consumers.fields.custom_id.placeholder"),readonly:u.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(s)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])],8,Fe)]),_:1}),e.createVNode(y,{modelValue:u.fields.tags,"onUpdate:modelValue":i[2]||(i[2]=C=>u.fields.tags=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-tags",help:e.unref(s)("consumers.fields.tags.help"),label:e.unref(s)("consumers.fields.tags.label"),"label-attributes":{info:e.unref(s)("consumers.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"250"}},placeholder:e.unref(s)("consumers.fields.tags.placeholder"),readonly:u.readonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","enable-terraform","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-bb697df5"]]),Pe={class:"kong-ui-consumer-entity-config-card"},Ue=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},enableTerraform:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const c=t,{i18n:{t:r},i18nT:o}=X.useI18n(),k=e.computed(()=>P.form[c.config.app].edit),s=e.ref({id:{},username:{section:f.ConfigurationSchemaSection.Basic,tooltip:r("consumers.fields.username.tooltip"),order:1},custom_id:{section:f.ConfigurationSchemaSection.Basic,tooltip:r("consumers.fields.custom_id.tooltip"),label:r("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:r("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(I,w)=>(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(e.unref(f.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":s.value,"enable-terraform":t.enableTerraform,"entity-type":e.unref(f.SupportedEntityType).Consumer,"fetch-url":k.value,"hide-title":t.hideTitle,"onFetch:error":w[0]||(w[0]=V=>I.$emit("fetch:error",V)),"onFetch:success":w[1]||(w[1]=V=>I.$emit("fetch:success",V)),onLoading:w[2]||(w[2]=V=>I.$emit("loading",V))},{"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(r)("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(r)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","enable-terraform","entity-type","fetch-url","hide-title"])]))}});E.ConsumerConfigCard=Ue,E.ConsumerForm=Re,E.ConsumerList=Be,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,re,ge,se,f){"use strict";const ye={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"},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. 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 he(){const t=se.createI18n("en-us",ye);return{i18n:t,i18nT:se.i18nTComponent(t)}}const X={useI18n:he},j="/v2/control-planes/{controlPlaneId}/core-entities",L="/{workspace}",P={list:{konnect:{all:`${j}/consumers`,forConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${j}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`},kongManager:{all:`${L}/consumers`,forConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${L}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${j}/v1/schemas/json/consumer/validate`,create:`${j}/consumers`,edit:`${j}/consumers/{id}`},kongManager:{validate:`${L}/schemas/consumers/validate`,create:`${L}/consumers`,edit:`${L}/consumers/{id}`}}},Ce={class:"add-consumer-form-container"},be={class:"add-consumer-form-cta"},ke={class:"select-item-label"},_e={key:0,class:"select-item-desc"},Ie={key:0,class:"kong-ui-entity-add-consumers-error"},we={key:0},Ve=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:c}){var C;const{i18n:{t:r}}=X.useI18n(),o=t,k=c,{axiosInstance:s}=f.useAxios((C=o.config)==null?void 0:C.axiosRequestConfig),I=e.ref([]),{debouncedQueryChange:w,loading:V,allRecords:x,error:u,loadItems:W,results:R}=f.useDebouncedFilter(o.config,P.list[o.config.app].all,"",{fetchedItemsKey:"data",searchKeys:["username","id"]}),U=l=>l,H=e.computed(()=>u.value?r("consumers.errors.general"):""),J=e.ref(0),M=e.computed(()=>x.value===void 0),K=e.computed(()=>R.value.map(l=>({label:l.username||l.customId,value:l.id,selected:I.value.includes(l.id),data:l}))),A=l=>{var p;const m=M.value?R.value.find(b=>b.id===l):(p=x.value)==null?void 0:p.find(b=>b.id===l);return m?m.username||m.custom_id:l},Y=()=>{D.value="",G.value=[],y.value=[],k("cancel")},G=e.ref([]),B=e.ref(!1),D=e.ref(""),q=async()=>{if(!I.value.length){D.value="",y.value=[],k("cancel");return}B.value=!0,D.value="",G.value=[],y.value=[];try{const l=I.value.map(b=>i(b)),m=await Promise.allSettled(l);let p=!0;m.forEach(b=>{b.status!=="fulfilled"&&(p=!1)}),p?(G.value=[],y.value=[],k("add:success",I.value),I.value=[]):(G.value.length&&k("add:partial-success",G.value),I.value=[],$(m))}catch{D.value=r("consumers.errors.add"),k("error",D.value)}finally{B.value=!1}},a=e.computed(()=>{var m,p,b,O;let l=`${o.config.apiBaseUrl}${P.list[o.config.app].forConsumerGroup}`;return o.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((m=o.config)==null?void 0:m.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((p=o.config)==null?void 0:p.consumerGroupId)||""):o.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(b=o.config)!=null&&b.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((O=o.config)==null?void 0:O.consumerGroupId)||"")),l}),i=async l=>{const m={consumer:l};try{const p=await s.post(a.value,m);return G.value.push(l),p}catch(p){let b=`${A(l)} - ${p.message}`;return p.response.status===409&&(b=`${A(l)} - ${r("consumers.errors.already_added")}`),Promise.reject(Error(b))}},y=e.ref([]),$=l=>{y.value=l.map(m=>{var p;return(p=m.reason)==null?void 0:p.message}).filter(Boolean)};return e.watch(K,()=>{J.value++},{immediate:!0,deep:!0}),e.watch(()=>o.visible,()=>{o.visible&&W()},{immediate:!0}),(l,m)=>{const p=e.resolveComponent("KMultiselect"),b=e.resolveComponent("KAlert"),O=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(O,{"action-button-disabled":B.value,class:"kong-ui-entities-add-consumers-modal","data-testid":"add-consumer-modal",title:e.unref(r)("consumers.consumer_groups.add.title"),visible:t.visible,onCancel:Y,onProceed:q},{default:e.withCtx(()=>[e.createElementVNode("div",Ce,[e.createElementVNode("p",be,e.toDisplayString(e.unref(r)("consumers.consumer_groups.add.ctaText")),1),e.createVNode(p,{modelValue:I.value,"onUpdate:modelValue":m[0]||(m[0]=T=>I.value=T),autosuggest:"","data-testid":"add-consumers-multiselect","dropdown-footer-text":M.value?e.unref(r)("consumers.consumer_groups.add.footer"):void 0,items:K.value,label:e.unref(r)("consumers.consumer_groups.add.consumers_label"),loading:e.unref(V),placeholder:e.unref(r)("consumers.consumer_groups.add.consumer_placeholder"),readonly:B.value,required:"",width:"100%",onQueryChange:e.unref(w)},{"item-template":e.withCtx(({item:T})=>[e.createElementVNode("div",ke,e.toDisplayString(T.label),1),U(T).data.username&&U(T).data.custom_id?(e.openBlock(),e.createElementBlock("div",_e,e.toDisplayString(U(T).data.custom_id),1)):e.createCommentVNode("",!0)]),_:1},8,["modelValue","dropdown-footer-text","items","label","loading","placeholder","readonly","onQueryChange"]),D.value||H.value||y.value.length?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(b,{appearance:"danger"},{default:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("consumers.errors.add")),1),y.value.length?(e.openBlock(),e.createElementBlock("ul",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(T,ee)=>(e.openBlock(),e.createElementBlock("li",{key:ee},e.toDisplayString(T),1))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,e.toDisplayString(D.value||H.value),1)]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["action-button-disabled","title","visible"])}}}),v=(t,c)=>{const r=t.__vccOpts||t;for(const[o,k]of c)r[o]=k;return r},xe=v(Ve,[["__scopeId","data-v-d54468ab"]]),Ne={class:"kong-ui-entities-consumers-list"},Ee={key:1},Be=v(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","copy:success","copy:error","delete:success","add:success","remove:success"],setup(t,{emit:c}){var pe;const r=c,o=t,{i18nT:k,i18n:{t:s}}=X.useI18n(),I=re.useRouter(),{axiosInstance:w}=f.useAxios((pe=o.config)==null?void 0:pe.axiosRequestConfig),V=e.ref(1),x=e.computed(()=>!!o.config.consumerGroupId),u=e.computed(()=>x.value?"kong-ui-entities-consumers-list-in-group-page":"kong-ui-entities-consumers-list"),W=e.computed(()=>o.config.app!=="kongManager"||!!o.config.disableSorting),R={username:{label:s("consumers.list.table_headers.username"),searchable:!0,sortable:!0,hidable:!1},custom_id:{label:s("consumers.list.table_headers.custom_id"),searchable:!0,sortable:!0},tags:{label:s("consumers.list.table_headers.tags"),sortable:!1}},U=R,H=n=>({"data-testid":n.username??n.custom_id??n.id}),J=e.computed(()=>{var d,h,N,S;let n=`${o.config.apiBaseUrl}${P.list[o.config.app][x.value?"forConsumerGroup":"all"]}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((d=o.config)==null?void 0:d.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((h=o.config)==null?void 0:h.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(N=o.config)!=null&&N.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((S=o.config)==null?void 0:S.consumerGroupId)||"")),n}),M=e.ref(""),K=e.computed(()=>{const n=o.config.app==="konnect"||o.config.isExactMatch;return n?{isExactMatch:n,placeholder:s(`consumers.search.placeholder.${o.config.app}`)}:{isExactMatch:n,fields:{username:R.username,custom_id:R.custom_id},schema:o.config.filterSchema}}),A=e.computed(()=>x.value&&!o.config.paginatedEndpoint?"consumers":void 0),{fetcher:Y,fetcherState:G}=f.useFetcher(o.config,J.value,A.value),B=()=>{M.value=""},D=()=>{V.value++},q=n=>n??"-",a=e.ref(null),i=(n,d)=>{const h=n.id;if(!d(h)){r("copy:error",{entity:n,field:"id",message:s("consumers.errors.copy")});return}r("copy:success",{entity:n,field:"id",message:s("consumers.copy.success",{val:h})})},y=(n,d)=>{const h=JSON.stringify(n);if(!d(h)){r("copy:error",{entity:n,message:s("consumers.errors.copy")});return}r("copy:success",{entity:n,message:s("consumers.copy.success_brief")})},$=async n=>{var h;await((h=o.canRetrieve)==null?void 0:h.call(o,n))&&I.push(o.config.getViewRoute(n.id))},C=n=>({label:s("consumers.actions.view"),to:o.config.getViewRoute(n)}),l=n=>({label:s("consumers.actions.edit"),to:o.config.getEditRoute(n)}),m=e.ref(void 0),p=e.ref(!1),b=e.ref(!1),O=e.ref(""),T=f.useDeleteUrlBuilder(o.config,J.value),ee=n=>{m.value=n,p.value=!0},Ke=()=>{p.value=!1},qe=async()=>{var n,d,h;if((n=m.value)!=null&&n.id){b.value=!0;try{await w.delete(T(m.value.id)),b.value=!1,p.value=!1,V.value++,r("delete:success",m.value)}catch(N){O.value=((h=(d=N.response)==null?void 0:d.data)==null?void 0:h.message)||N.message||s("consumers.errors.delete"),r("error",N)}finally{b.value=!1}}},te=e.ref(!1),ie=()=>{te.value=!0},le=()=>{te.value=!1},ce=(n,d)=>{d||le(),V.value++,r("add:success",n)},Oe=()=>{x.value&&ie()},F=e.ref(void 0),oe=e.ref(!1),je=e.ref(""),Le=n=>{F.value=n,oe.value=!0},de=()=>{oe.value=!1,F.value=void 0},We=e.computed(()=>{var d,h,N,S;let n=`${o.config.apiBaseUrl}${P.list[o.config.app].oneForConsumerGroup}`;return o.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((d=o.config)==null?void 0:d.controlPlaneId)||"").replace(/{consumerGroupId}/gi,((h=o.config)==null?void 0:h.consumerGroupId)||""):o.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(N=o.config)!=null&&N.workspace?`/${o.config.workspace}`:"").replace(/{consumerGroupId}/gi,((S=o.config)==null?void 0:S.consumerGroupId)||"")),n}),ue=e.ref(!1),He=async()=>{if(F.value){ue.value=!0;try{const n=We.value.replace(/{consumerId}/gi,F.value.id);await w.delete(n),r("remove:success",F.value),de(),V.value++}catch(n){je.value=n.message||s("consumers.errors.delete"),r("error",n)}finally{ue.value=!1}}},me=e.ref(!1);e.watch(G,n=>{var d,h,N,S;if(Array.isArray((d=n==null?void 0:n.response)==null?void 0:d.data)&&(me.value=n.response.data.length>0),n.status===f.FetcherStatus.Error){a.value={title:s("consumers.errors.general")},(S=(N=(h=n.error)==null?void 0:h.response)==null?void 0:N.data)!=null&&S.message&&(a.value.message=n.error.response.data.message),r("error",n.error);return}a.value=null});const ne=e.ref({ctaPath:x.value?void 0:o.config.createRoute,ctaText:void 0,message:`${s("consumers.list.empty_state.description")}${o.config.additionMessageForEmptyState?` ${o.config.additionMessageForEmptyState}`:""}`,title:s("consumers.title")});return e.onBeforeMount(async()=>{await o.canCreate()&&(ne.value.title=x.value?s("consumers.list.empty_state.title_for_consumer_group"):s("consumers.list.empty_state.title"),ne.value.ctaText=x.value?s("consumers.actions.add_consumer"):s("consumers.actions.create"))}),(n,d)=>{const h=e.resolveComponent("KButton"),N=e.resolveComponent("KBadge"),S=e.resolveComponent("KTruncate"),z=e.resolveComponent("KDropdownItem"),fe=e.resolveComponent("KClipboardProvider"),Je=e.resolveComponent("KPrompt");return e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(f.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-pagination":x.value&&!t.config.paginatedEndpoint,"disable-pagination-page-jump":"","disable-sorting":W.value,"empty-state-options":ne.value,"enable-entity-actions":"","error-message":a.value,fetcher:e.unref(Y),"fetcher-cache-key":V.value,"pagination-type":"offset","preferences-storage-key":u.value,query:M.value,"row-attributes":H,"table-headers":e.unref(U),"use-action-outside":t.useActionOutside,onClearSearchInput:B,"onClick:row":d[3]||(d[3]=g=>$(g)),onEmptyStateCtaClicked:Oe,onSort:D},{"toolbar-filter":e.withCtx(()=>[x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(f.EntityFilter),{key:0,modelValue:M.value,"onUpdate:modelValue":d[0]||(d[0]=g=>M.value=g),config:K.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.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(h,{appearance:"primary","data-testid":"toolbar-add-consumer",size:"large",to:t.config.consumerGroupId?void 0:t.config.createRoute,onClick:d[1]||(d[1]=()=>t.config.consumerGroupId?ie():void 0)},{default:e.withCtx(()=>[e.createVNode(e.unref(ge.AddIcon)),e.createTextVNode(" "+e.toDisplayString(t.config.consumerGroupId?e.unref(s)("consumers.actions.add_consumer"):e.unref(s)("consumers.list.toolbar_actions.new_consumer")),1)]),_:1},8,["to"]),[[e.vShow,me.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),username:e.withCtx(({rowValue:g})=>[e.createElementVNode("b",null,e.toDisplayString(q(g)),1)]),custom_id:e.withCtx(({rowValue:g})=>[e.createTextVNode(e.toDisplayString(q(g)),1)]),tags:e.withCtx(({rowValue:g})=>[g&&g.length>0?(e.openBlock(),e.createBlock(S,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g,Q=>(e.openBlock(),e.createBlock(N,{key:Q,onClick:d[2]||(d[2]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Q),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",Ee,"-"))]),actions:e.withCtx(({row:g})=>[e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:Q})=>[e.createVNode(z,{"data-testid":"action-entity-copy-id",onClick:Qe=>i(g,Q)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("consumers.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(fe,null,{default:e.withCtx(({copyToClipboard:Q})=>[e.createVNode(z,{"data-testid":"action-entity-copy-json",onClick:Qe=>y(g,Q)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("consumers.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(g)},{default:e.withCtx(()=>[e.createVNode(z,{"data-testid":"action-entity-view","has-divider":"",item:C(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canEdit(g)},{default:e.withCtx(()=>[e.createVNode(z,{"data-testid":"action-entity-edit",item:l(g.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(f.PermissionsWrapper),{"auth-function":()=>t.canDelete(g)},{default:e.withCtx(()=>[e.createVNode(z,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:()=>t.config.consumerGroupId?Le(g):ee(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.config.consumerGroupId?e.unref(s)("consumers.actions.remove"):e.unref(s)("consumers.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-pagination","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","preferences-storage-key","query","table-headers","use-action-outside"]),e.createVNode(e.unref(f.EntityDeleteModal),{"action-button-disabled":b.value,"data-testid":"delete-consumer-modal",description:e.unref(s)("consumers.delete.description"),"entity-name":m.value&&(m.value.username||m.value.custom_id||m.value.id),"entity-type":e.unref(f.EntityTypes).Consumer,error:O.value,title:e.unref(s)("consumers.delete.title"),visible:p.value,onCancel:Ke,onProceed:qe},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:te.value,"onAdd:partialSuccess":d[4]||(d[4]=g=>ce(g,!0)),"onAdd:success":d[5]||(d[5]=g=>ce(g)),onCancel:le},null,8,["config","visible"])):e.createCommentVNode("",!0),t.config.consumerGroupId&&F.value?(e.openBlock(),e.createBlock(Je,{key:1,"action-button-appearance":"danger","data-testid":"remove-consumer-modal",title:e.unref(s)("consumers.consumer_groups.remove.title"),visible:oe.value,onCancel:de,onProceed:He},{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(F.value.username||F.value.custom_id||F.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(s)("consumers.consumer_groups.remove.description")),1)]),_:1},8,["title","visible"])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-9a998e6f"]]);let Z;const De=new Uint8Array(16);function $e(){if(!Z&&(Z=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Z))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(De)}const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function Me(t,c=0){return _[t[c+0]]+_[t[c+1]]+_[t[c+2]]+_[t[c+3]]+"-"+_[t[c+4]]+_[t[c+5]]+"-"+_[t[c+6]]+_[t[c+7]]+"-"+_[t[c+8]]+_[t[c+9]]+"-"+_[t[c+10]]+_[t[c+11]]+_[t[c+12]]+_[t[c+13]]+_[t[c+14]]+_[t[c+15]]}const ae={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ge(t,c,r){if(ae.randomUUID&&!c&&!t)return ae.randomUUID();t=t||{};const o=t.random||(t.rng||$e)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,c){r=r||0;for(let k=0;k<16;++k)c[r+k]=o[k];return c}return Me(o)}const Te={class:"kong-ui-entities-consumer-form"},Se=["id"],Ae={class:"fields-group-text"},Fe=["aria-labelledby"],Re=v(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:""},enableTerraform:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(t,{emit:c}){var q;const r=t,o=c,{i18nT:k,i18n:{t:s}}=X.useI18n(),I=re.useRouter(),{axiosInstance:w}=f.useAxios((q=r.config)==null?void 0:q.axiosRequestConfig),{getMessageFromError:V}=f.useErrors(),x=Ge(),u=e.reactive({fields:{username:"",customId:"",tags:""},readonly:!1,errorMessage:""}),W=e.reactive({username:"",customId:"",tags:""}),R=e.computed(()=>{var a,i;return(i=P.form[(a=r.config)==null?void 0:a.app])==null?void 0:i.edit}),U=()=>{var a;I.push(((a=r.config)==null?void 0:a.cancelRoute)||{name:"consumer-list"})},H=a=>{o("loading",a)},J=a=>{o("error",a)},M=a=>{var y,$,C;u.fields.username=((y=a==null?void 0:a.item)==null?void 0:y.username)||(a==null?void 0:a.username)||"",u.fields.customId=(($=a==null?void 0:a.item)==null?void 0:$.custom_id)||(a==null?void 0:a.custom_id)||"";const i=((C=a==null?void 0:a.item)==null?void 0:C.tags)||(a==null?void 0:a.tags)||[];u.fields.tags=(i==null?void 0:i.join(", "))||"",Object.assign(W,u.fields)},K=e.computed(()=>r.consumerId?f.EntityBaseFormType.Edit:f.EntityBaseFormType.Create),A=a=>{var y,$,C,l,m,p;let i=`${(y=r.config)==null?void 0:y.apiBaseUrl}${P.form[($=r.config)==null?void 0:$.app][a]}`;return((C=r.config)==null?void 0:C.app)==="konnect"?i=i.replace(/{controlPlaneId}/gi,((l=r.config)==null?void 0:l.controlPlaneId)||""):((m=r.config)==null?void 0:m.app)==="kongManager"&&(i=i.replace(/\/{workspace}/gi,(p=r.config)!=null&&p.workspace?`/${r.config.workspace}`:"")),i=i.replace(/{id}/gi,r.consumerId),i},Y=e.computed(()=>!!u.fields.username||!!u.fields.customId),G=e.computed(()=>JSON.stringify(u.fields)!==JSON.stringify(W)),B=e.computed(()=>{var a,i;return{username:u.fields.username||null,custom_id:u.fields.customId||null,tags:(i=(a=u.fields.tags.split(","))==null?void 0:a.map(y=>String(y||"").trim()))==null?void 0:i.filter(y=>y!=="")}}),D=async()=>{var a;try{u.readonly=!0;let i;await w.post(A("validate"),B.value),K.value==="create"?i=await w.post(A("create"),B.value):K.value==="edit"&&(i=((a=r.config)==null?void 0:a.app)==="konnect"?await w.put(A("edit"),B.value):await w.patch(A("edit"),B.value)),M(i==null?void 0:i.data),o("update",i==null?void 0:i.data)}catch(i){u.errorMessage=V(i),o("error",i)}finally{u.readonly=!1}};return(a,i)=>{const y=e.resolveComponent("KInput"),$=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(e.unref(f.EntityBaseForm),{"can-submit":Y.value&&G.value,config:t.config,"edit-id":t.consumerId,"enable-terraform":t.enableTerraform,"entity-type":e.unref(f.SupportedEntityType).Consumer,"error-message":u.errorMessage,"fetch-url":R.value,"form-fields":B.value,"is-readonly":u.readonly,onCancel:U,"onFetch:error":i[3]||(i[3]=C=>J(C)),"onFetch:success":M,onLoading:i[4]||(i[4]=C=>H(C)),onSubmit:D},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(f.EntityFormSection),{description:e.unref(s)("consumers.form.info.description"),"has-divider":"",title:e.unref(s)("consumers.form.info.title")},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("h3",{id:`fields-group-title-${e.unref(x)}`,class:"fields-group-title"},e.toDisplayString(e.unref(s)("consumers.form.consumer_identification.title"))+"* ",9,Se),e.createElementVNode("p",Ae,e.toDisplayString(e.unref(s)("consumers.form.consumer_identification.description")),1)]),e.createVNode($,null,{default:e.withCtx(()=>[e.createElementVNode("fieldset",{"aria-labelledby":`fields-group-title-${e.unref(x)}`},[e.createVNode(y,{modelValue:u.fields.username,"onUpdate:modelValue":i[0]||(i[0]=C=>u.fields.username=C),modelModifiers:{trim:!0},autocomplete:"off",class:"username-field","data-testid":"consumer-form-username",label:e.unref(s)("consumers.fields.username.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(s)("consumers.fields.username.placeholder"),readonly:u.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(s)("consumers.fields.username.custom_id")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),e.createVNode(y,{modelValue:u.fields.customId,"onUpdate:modelValue":i[1]||(i[1]=C=>u.fields.customId=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-custom-id",label:e.unref(s)("consumers.fields.custom_id.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(s)("consumers.fields.custom_id.placeholder"),readonly:u.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(s)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])],8,Fe)]),_:1}),e.createVNode(y,{modelValue:u.fields.tags,"onUpdate:modelValue":i[2]||(i[2]=C=>u.fields.tags=C),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"consumer-form-tags",help:e.unref(s)("consumers.fields.tags.help"),label:e.unref(s)("consumers.fields.tags.label"),"label-attributes":{info:e.unref(s)("consumers.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(s)("consumers.fields.tags.placeholder"),readonly:u.readonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","enable-terraform","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-5973c664"]]),Pe={class:"kong-ui-consumer-entity-config-card"},Ue=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},enableTerraform:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(t){const c=t,{i18n:{t:r},i18nT:o}=X.useI18n(),k=e.computed(()=>P.form[c.config.app].edit),s=e.ref({id:{},username:{section:f.ConfigurationSchemaSection.Basic,tooltip:r("consumers.fields.username.tooltip"),order:1},custom_id:{section:f.ConfigurationSchemaSection.Basic,tooltip:r("consumers.fields.custom_id.tooltip"),label:r("consumers.fields.custom_id.label"),order:2},updated_at:{},created_at:{},tags:{tooltip:r("consumers.fields.tags.tooltip")},username_lower:{hidden:!0},type:{hidden:!0}});return(I,w)=>(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(e.unref(f.EntityBaseConfigCard),{config:t.config,"config-card-doc":t.configCardDoc,"config-schema":s.value,"enable-terraform":t.enableTerraform,"entity-type":e.unref(f.SupportedEntityType).Consumer,"fetch-url":k.value,"hide-title":t.hideTitle,"onFetch:error":w[0]||(w[0]=V=>I.$emit("fetch:error",V)),"onFetch:success":w[1]||(w[1]=V=>I.$emit("fetch:success",V)),onLoading:w[2]||(w[2]=V=>I.$emit("loading",V))},{"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(r)("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(r)("consumers.fields.custom_id.username")),1)]),_:1})]),_:1},8,["config","config-card-doc","config-schema","enable-terraform","entity-type","fetch-url","hide-title"])]))}});E.ConsumerConfigCard=Ue,E.ConsumerForm=Re,E.ConsumerList=Be,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{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-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .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(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{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-85381f68]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-85381f68]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-85381f68]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-85381f68] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-85381f68]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-94d27e50]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-94d27e50]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-94d27e50] .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-94d27e50] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-94d27e50] .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-94d27e50] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-71b4425a]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-71b4425a]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-71b4425a]{float:right}.kong-ui-entity-base-table .actions-container[data-v-71b4425a] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.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-94990087]{width:100%}.kong-ui-entity-filter-clear[data-v-94990087]{cursor:pointer}.kong-ui-entity-filter[data-v-94990087]{display:flex;position:relative}.kong-ui-entity-filter[data-v-94990087] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-94990087] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-94990087]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-94990087]{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-94990087]{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-94990087]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-94990087]{color:#232633}.menu-item-expand-icon[data-v-94990087]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-94990087]{transform:rotate(180deg)}.menu-item-indicator[data-v-94990087]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-94990087]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-94990087] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-94990087] .k-input{width:100%}.menu-item-body[data-v-94990087] .k-select-input .input{font-size:12px}.menu-item-body[data-v-94990087] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-94990087]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-94990087]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-94990087]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.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}.kong-ui-entities-consumers-list[data-v-9a998e6f]{width:100%}.kong-ui-entities-consumers-list .message[data-v-9a998e6f]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-9a998e6f]{margin-right:12px}.kong-ui-entities-consumer-form[data-v-bb697df5]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-form[data-v-bb697df5] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-form fieldset[data-v-bb697df5]{border:none;margin:0;padding:0}.fields-group-title[data-v-bb697df5]{color:#232633;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-bb697df5]{color:#00000073;font-size:14px;line-height:20px;margin-bottom:0;margin-top:0}.username-field[data-v-bb697df5]{margin-bottom:16px}
|
|
1
|
+
.config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{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-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .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(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{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-85381f68]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-85381f68]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-85381f68]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-85381f68] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-85381f68]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-94d27e50]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-94d27e50]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-94d27e50] .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-94d27e50] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-94d27e50] .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-94d27e50] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-71b4425a]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-71b4425a]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-71b4425a]{float:right}.kong-ui-entity-base-table .actions-container[data-v-71b4425a] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.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-94990087]{width:100%}.kong-ui-entity-filter-clear[data-v-94990087]{cursor:pointer}.kong-ui-entity-filter[data-v-94990087]{display:flex;position:relative}.kong-ui-entity-filter[data-v-94990087] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-94990087] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-94990087]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-94990087]{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-94990087]{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-94990087]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-94990087]{color:#232633}.menu-item-expand-icon[data-v-94990087]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-94990087]{transform:rotate(180deg)}.menu-item-indicator[data-v-94990087]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-94990087]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-94990087] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-94990087] .k-input{width:100%}.menu-item-body[data-v-94990087] .k-select-input .input{font-size:12px}.menu-item-body[data-v-94990087] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-94990087]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-94990087]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-94990087]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.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}.kong-ui-entities-consumers-list[data-v-9a998e6f]{width:100%}.kong-ui-entities-consumers-list .message[data-v-9a998e6f]{margin-top:0}.kong-ui-entities-consumers-list .kong-ui-entity-filter-input[data-v-9a998e6f]{margin-right:12px}.kong-ui-entities-consumer-form[data-v-5973c664]{width:100%}@media screen and (min-width: 1280px){.kong-ui-entities-consumer-form[data-v-5973c664] .form-section-wrapper{column-gap:64px}}.kong-ui-entities-consumer-form fieldset[data-v-5973c664]{border:none;margin:0;padding:0}.fields-group-title[data-v-5973c664]{color:#232633;font-size:16px;font-weight:600;line-height:20px;margin-bottom:4px;margin-top:0}.fields-group-text[data-v-5973c664]{color:#00000073;font-size:14px;line-height:20px;margin-bottom:0;margin-top:0}.username-field[data-v-5973c664]{margin-bottom:16px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsumerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ConsumerForm.vue.ts"],"names":[],"mappings":"AAWA,OAAO,gDAAgD,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAGV,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,EAC1B,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;;
|
|
1
|
+
{"version":3,"file":"ConsumerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ConsumerForm.vue.ts"],"names":[],"mappings":"AAWA,OAAO,gDAAgD,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAGV,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,EAC1B,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAA;;IAuepD,oHAAoH;;;;4BAI9F,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF,6FAA6F;;;;;;IAM7F;;;OAGG;;;;;;;;;;IArBH,oHAAoH;;;;4BAI9F,yBAAyB,GAAG,6BAA6B,KAAG,OAAO;;IAQzF,6FAA6F;;;;;;IAM7F;;;OAGG;;;;;;;;;;;;;AA3BL,wBAkCG"}
|