@kong-ui-public/entities-consumers 2.7.1 → 2.7.2
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.
|
@@ -377,7 +377,7 @@ function Rr(e, n, t, r = {
|
|
|
377
377
|
fetchedItemsKey: "data",
|
|
378
378
|
searchKeys: ["id"]
|
|
379
379
|
}) {
|
|
380
|
-
t || (t = "
|
|
380
|
+
t || (t = "1000");
|
|
381
381
|
const { axiosInstance: a } = kt({
|
|
382
382
|
headers: e.requestHeaders
|
|
383
383
|
}), { i18n: { t: o } } = Ct(), { debounce: i } = jr(), l = i(async (v) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Y,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],t):(Y=typeof globalThis<"u"?globalThis:Y||self,t(Y["kong-ui-public-entities-consumers"]={},Y.Vue,Y.VueRouter,Y["kong-ui-public-i18n"],Y.axios,Y.Kongponents))})(this,function(Y,t,$e,xe,ot,$n){"use strict";const jn={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 Mn(){const e=xe.createI18n("en-us",jn);return{i18n:e,i18nT:xe.i18nTComponent(e)}}const Se={useI18n:Mn},je="/api/runtime_groups/{controlPlaneId}",ce="/{workspace}",ie={list:{konnect:{all:"/v2/control-planes/{controlPlaneId}/core-entities/consumers",forConsumerGroup:"/v2/control-planes/{controlPlaneId}/core-entities/consumer_groups/{consumerGroupId}/consumers",oneForConsumerGroup:"/v2/control-planes/{controlPlaneId}/core-entities/consumer_groups/{consumerGroupId}/consumers/{consumerId}"},kongManager:{all:`${ce}/consumers`,forConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${je}/v1/schemas/json/consumer/validate`,create:`${je}/consumers`,edit:`${je}/consumers/{id}`},kongManager:{validate:`${ce}/schemas/consumers/validate`,create:`${ce}/consumers`,edit:`${ce}/consumers/{id}`}}};var at=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(at||{}),Me=(e=>(e.Edit="edit",e.Create="create",e))(Me||{}),le=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(le||{}),D=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(D||{}),H=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(H||{});function On(){return{getAxiosInstance:(e={})=>{try{const r=t.inject("get-axios-instance",void 0);return typeof r=="function"?r(e):ot.create({withCredentials:!0,timeout:3e4,...e})}catch(r){return console.warn("getAxiosInstance:",r.message||r),ot.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var r;return((r=e==null?void 0:e.response)==null?void 0:r.headers["x-datadog-trace-id"])||""}}}function Fn(){return{debounce:(e,r)=>{let n;return(...o)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{e(...o)},r)}}}}const Oe="khcp-user-table-preferences",Dn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function qn(){const e=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(o){console.error("useTablePreferences(tryParseJson)",o);return}},r=()=>{const n=e(localStorage.getItem(Oe));return!n||!Object.keys(n).length?new Map:new Map(Object.entries(n))};return{setTablePreferences:(n,o)=>{try{const a=r();a.set(n,o),localStorage.setItem(Oe,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:n=>{const o=r();return(o==null?void 0:o.get(n))||void 0||Dn},deleteAllTablePreferences:()=>{localStorage.removeItem(Oe)}}}function Fe(e={}){const{getAxiosInstance:r}=On();return{axiosInstance:r(e)}}const vn={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},Ln={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},Kn={actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},Pn={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},Un={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},Rn={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},zn={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Gn={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Hn={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},Jn={global:vn,deleteModal:Ln,baseForm:Kn,baseTable:Pn,baseConfigCard:Un,filter:Rn,debouncedFilter:zn,errors:Gn,toggleModal:Hn};function De(){const e=xe.createI18n("en-us",Jn);return{i18n:e,i18nT:xe.i18nTComponent(e)}}function it(){const e=(n,o)=>(o==null?void 0:o[n])??void 0,r=(n,o)=>{if(n.length!==o.length)return!1;const a=new Set([...n,...o]);for(const i of a){const l=n.filter(c=>c===i).length,s=o.filter(c=>c===i).length;if(l!==s)return!1}return!0};return{getPropValue:e,objectsAreEqual:(n,o,a)=>{if(a){if(Object.keys(n).length===Object.keys(o).length)for(const i in n)if(Array.isArray(n[i])&&Array.isArray(o[i])){if(r(n[i],o[i]))continue;return!1}else{if(n[i]===o[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(n)===JSON.stringify(o)}catch{return!1}},sortAlpha:n=>(o,a)=>{let i=o[n]===void 0||o[n]===null?"":o[n],l=a[n]===void 0||a[n]===null?"":a[n];return Array.isArray(o[n])&&(i=o[n][0]),Array.isArray(a[n])&&(l=a[n][0]),i.localeCompare(l)},isValidUuid:n=>n?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(n):!1}}function Wn(e,r,n,o={fetchedItemsKey:"data",searchKeys:["id"]}){n||(n="100");const{axiosInstance:a}=Fe({headers:e.requestHeaders}),{i18n:{t:i}}=De(),{debounce:l}=Fn(),s=l(async y=>{await q(y)},200),c=t.ref(!1),d=t.ref(""),p=t.ref(""),u=t.ref([]),g=t.ref([]),m=t.ref(void 0),x=t.unref(r);let C=`${e.apiBaseUrl}${x}`;e.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:S}=it(),$=async()=>{try{c.value=!0;const{data:y}=await a.get(`${C}?size=${n}`);y!=null&&y.next||(m.value=o.fetchedItemsKey in y?y[o.fetchedItemsKey]:[]),g.value=o.fetchedItemsKey in y?y[o.fetchedItemsKey]:[],u.value=g.value}catch{u.value=[],d.value=i("debouncedFilter.errors.fetch")}finally{c.value=!1}},V=t.ref(""),q=async y=>{var h,f,k;if(V.value!==y)if(V.value=y||"",m.value===void 0)try{if(c.value=!0,d.value="",p.value="",e.app==="konnect"){let b=C+"";y&&(b+=`/${y}`);const{data:w}=await a.get(`${b}?size=${n}`);o.fetchedItemsKey in w?u.value=w[o.fetchedItemsKey]:w!=null&&w.id?u.value=[w]:u.value=[]}else if(y){const b=[];S(y)&&o.searchKeys.includes("id")?b.push((async()=>{const{data:I}=await a.get(`${C}/${y}`);return[I[o.fetchedItemsKey]??I]})()):b.push(...o.searchKeys.filter(I=>I!=="id").map(async I=>{const{data:A}=await a.get(`${C}?${I}=${y}`);return A[o.fetchedItemsKey]}));const w=await Promise.all(b),T=new Set;u.value=[],(h=w==null?void 0:w.forEach)==null||h.call(w,I=>{var A;(A=I==null?void 0:I.forEach)==null||A.call(I,N=>{T.has(N.id)||(T.add(N.id),u.value.push(N))})})}else u.value=g.value}catch(b){((f=b==null?void 0:b.response)==null?void 0:f.status)===404?p.value=i("debouncedFilter.errors.invalid"):(u.value=[],d.value=i("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,p.value="",y?(u.value=(k=m.value)==null?void 0:k.filter(b=>{var w;let T=!1;for(const I of o.searchKeys){const A=typeof b[I]=="string"?(w=b[I])==null?void 0:w.toLowerCase():b[I];A!=null&&A.includes(y.toLowerCase())&&(T=!0)}return T}),(!u.value||!u.value.length)&&(p.value=i("debouncedFilter.errors.invalid"))):u.value=m.value,c.value=!1};return{loading:c,error:d,validationError:p,results:u,allRecords:m,loadItems:$,debouncedQueryChange:s}}function Yn(e,r){const n=t.unref(r),o=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${n}`):new URL(n));return o.value.search="",a=>`${o.value.href}/${a}`}function Zn(){const{i18n:{t:e}}=De();return{getMessageFromError:r=>{var n,o,a,i;if(!r)return e("errors.unexpected");if(((n=r==null?void 0:r.response)==null?void 0:n.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=r==null?void 0:r.response)!=null&&o.data){if(r.response.data.detail)return r.response.data.detail;if((a=r.response.data.details)!=null&&a.length)return r.response.data.details.map(l=>{let s=e("errors.unexpected");return l.messages&&typeof l.messages=="object"&&l.messages.length&&(s=l.messages.join(", ")),l.field?`${l.field} - ${s}`:s}).join("; ");if(r.response.data.message){const{message:l}=r.response.data;return Array.isArray(l)?(i=l[0])!=null&&i.constraints?Object.values(l[0].constraints)[0]:l[0]:l}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(l=>`${l} ${r.response.data[l]}`).join(", ")}return r.message||e("errors.unexpected")}}}function Qn(e){const r=window.location.origin,n=r.endsWith("/")?r:`${r}/`;try{const o=e.join("/"),a=`${n}${o}`,i=e.some(l=>l.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!i&&new URL(a))return`${n}${o}`;throw new Error("Invalid url")}catch(o){return console.warn("Failed to build valid URL:",o),""}}function lt(e,r){const n=t.ref(t.unref(e)),o=t.ref(t.unref(r)),a=t.computed(()=>!!(n.value.app==="konnect"||n.value.isExactMatch)),i=t.computed(()=>o.value.startsWith("/")?new URL(`${window.location.origin}${o.value}`):new URL(o.value));return l=>{const{page:s,pageSize:c,offset:d,sortColumnKey:p,sortColumnOrder:u,query:g}=l;try{let m=new URL(i.value.href);return a.value&&g?(m.search="",m=n.value.isExactMatch?new URL(`${m.href}/${g}/`):new URL(`${m.href}?filter[name][contains]=${g}`)):(a.value||new URLSearchParams(g).forEach((x,C)=>{m.searchParams.append(C,x)}),p&&m.searchParams.append("sort_by",p),u==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(c))),d&&s!==1&&m.searchParams.append("offset",String(d)),m.href}catch(m){return console.error("RouteList(fetcher)",m),o.value}}}function Xn(e,r,n="data"){var o;const a=t.unref(r),{axiosInstance:i}=Fe({...e.axiosRequestConfig,headers:{...(o=e.axiosRequestConfig)==null?void 0:o.headers,...e.requestHeaders}}),l=lt(e,a),s=t.ref({status:le.Idle});return{fetcher:async c=>{var d;try{s.value={status:le.Loading};let p=l(c);p.includes("filter[name]")&&(p=`${p}&page[size]=${c.pageSize}&page[number]=${c.page}`);const u=await i.get(p);if(u.status>=400)throw u;const g=u.data,m=n&&n.replace(/[^\w-_]/gi,"");let x;g[m]&&Array.isArray(g[m])?x=g[m]:Array.isArray(g)?x=g:x=Object.keys(g).length?[g]:[];const C={data:x,total:x.length,...g.offset?{pagination:{offset:g.offset}}:null};return s.value={status:le.Idle,response:C},C}catch(p){const u={data:[],total:0};return c.query&&(((d=p.response)==null?void 0:d.status)===404||p.status===404)?(s.value={status:le.NoResults,response:u,error:p.response?p:{response:p}},u):(s.value={status:le.Error,response:u,error:p.response?p:{response:p}},u)}},fetcherState:s}}function er(){const e=(n,o="_")=>n?n.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",r=/(?:^|[\s-:'"])\w/g;return{capitalize:n=>n?n.replace(r,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const st=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,ct=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const r=e.match(st);if(!r)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return r.shift(),r},dt=e=>e==="*"||e==="x"||e==="X",ut=e=>{const r=parseInt(e,10);return isNaN(r)?e:r},tr=(e,r)=>typeof e!=typeof r?[String(e),String(r)]:[e,r],nr=(e,r)=>{if(dt(e)||dt(r))return 0;const[n,o]=tr(ut(e),ut(r));return n>o?1:n<o?-1:0},pt=(e,r)=>{for(let n=0;n<Math.max(e.length,r.length);n++){const o=nr(e[n]||"0",r[n]||"0");if(o!==0)return o}return 0},rr=(e,r)=>{const n=ct(e),o=ct(r),a=n.pop(),i=o.pop(),l=pt(n,o);return l!==0?l:a&&i?pt(a.split("."),i.split(".")):a||i?a?-1:1:0},ft=(e,r,n)=>{or(n);const o=rr(e,r);return mt[n].includes(o)},mt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},gt=Object.keys(mt),or=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(gt.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${gt.join("|")}`)},ar=e=>typeof e=="string"&&/^[v\d]/.test(e)&&st.test(e);function ir(e){const{gatewayInfo:r,supportedRange:n}=e;if(!r)return!0;const{edition:o,version:a}=r;if(!ar(a))return console.error("Invalid version"),!1;const i=n[o];if(!i)return!1;const[l,s]=i;return!(l&&ft(a,l,"<")||s&&ft(a,s,">"))}function lr(e){const r=t.ref(0),n=t.ref(0),o=t.ref(!1);return t.watch(e,a=>{a&&!o.value&&(r.value=a.offsetWidth,n.value=a.scrollWidth,o.value=!0)}),{isTruncated:t.computed(()=>r.value<n.value)}}const P={useAxios:Fe,useDebouncedFilter:Wn,useDeleteUrlBuilder:Yn,useErrors:Zn,useExternalLinkCreator:Qn,useFetcher:Xn,useFetchUrlBuilder:lt,useHelpers:it,useStringHelpers:er,useI18n:De,useGatewayFeatureSupported:ir,useTruncationDetector:lr},sr={key:0,class:"config-card-fieldset-title"},cr=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const r=e,{i18n:{t:n}}=P.useI18n(),{convertKeyToTitle:o}=P.useStringHelpers(),a=t.computed(()=>r.item.key??"json-array-item"),i=t.computed(()=>r.item.value??r.item),l=t.computed(()=>{const c=JSON.parse(JSON.stringify(i.value));return r.isArrayItem&&delete c.name,c}),s=t.computed(()=>{var c;return r.isArrayItem?(c=i.value)!=null&&c.name?o(i.value.name,"_"):n("baseConfigCard.general.entryTitle",{index:r.index}):""});return(c,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",sr,[t.createElementVNode("b",null,t.toDisplayString(s.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(l.value),(p,u)=>(t.openBlock(),t.createBlock(yt,{key:`${a.value}-property-${u}`,item:{key:p,label:t.unref(o)(p),value:l.value[p]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),Z=(e,r)=>{const n=e.__vccOpts||e;for(const[o,a]of r)n[o]=a;return n},ht=Z(cr,[["__scopeId","data-v-68ca83ec"]]),dr=t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:r}}=P.useI18n();return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(a,{appearance:"tertiary",class:"navigation-button",onClick:o[0]||(o[0]=i=>n.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(r)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),ur=Z(dr,[["__scopeId","data-v-c96811e5"]]),pr=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:r}}=P.useI18n();return(n,o)=>{const a=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(a,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(r)("baseConfigCard.statusBadge.enabledLabel"):t.unref(r)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),fr="#0044f4",mr="#e0e4ea",gr="#3a3f51",hr="#afb7c5",yr="1px",br="20px",kr={class:"config-card-details-row"},Cr=["data-testid"],wr=["data-testid"],xr=["data-testid"],Sr=["data-testid"],Ir={key:1},Nr=["data-testid"],Br=["data-testid"],_r=["data-testid"],Ar=["data-testid"],Er={name:"ConfigCardItem",components:{JsonCardItem:ht,StatusBadge:pr,InternalLinkItem:ur}},Vr=t.defineComponent({...Er,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:r}){t.useCssVars(x=>({"07753575":p.value?"none":`solid ${t.unref(yr)} ${t.unref(mr)}`,"32d44ea8":d.value&&s.value?"block":"flex","5036b738":d.value&&s.value?"100%":n.slim?"50%":"25%","5038fd13":d.value&&s.value?"100%":n.slim?"50%":"75%"}));const n=e,o=r,a=t.useSlots(),{i18n:{t:i,formatUnixTimeStamp:l}}=P.useI18n(),s=t.computed(()=>n.item.value!==void 0&&n.item.value!==null&&n.item.value!==""),c=t.computed(()=>!!(n.item.tooltip||a["label-tooltip"])),d=t.computed(()=>n.item.type===D.Json||n.item.type===D.JsonArray),p=t.computed(()=>n.item.type===D.JsonArray),u=t.computed(()=>{switch(n.item.type){case D.ID:return{tag:"KCopy",attrs:{"data-testid":`${n.item.key}-copy-uuid`,"copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label}),text:n.item.value}};case D.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label})}};case D.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${n.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label}),text:n.item.value}};case D.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label})}};case D.Date:return{tag:"div",attrs:{"data-testid":`${n.item.key}-date`},text:l(n.item.value)};case D.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${n.item.key}-badge-status`,status:n.item.value}};case D.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case D.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case D.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${n.item.key}-internal-link`,item:n.item,onNavigationClick:x=>{o("navigation-click",x)}}};case D.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${n.item.key}-external-link`,href:n.item.value},text:n.item.value};case D.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-content`,item:n.item}};case D.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-array-content`,item:n.item}};default:return{tag:"div",attrs:{"data-testid":`${n.item.key}-plain-text`},text:n.item.value}}}),g=t.ref(),{isTruncated:m}=P.useTruncationDetector(g);return(x,C)=>{const S=t.resolveComponent("KLabel"),$=t.resolveComponent("KBadge"),V=t.resolveComponent("KCopy"),q=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",kr,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(x.$slots,"label",{item:e.item},()=>[t.createVNode(S,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[c.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(x.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,wr)]),key:"0"}:void 0]),1024)],!0)],8,Cr),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(x.$slots,e.item.key,{rowValue:e.item.value},()=>[s.value?(t.openBlock(),t.createElementBlock("div",Ir,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.value.tag),t.normalizeProps(t.guardReactiveProps(u.value.attrs)),{default:t.withCtx(()=>[u.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock($,{key:`${e.item.key}-badge-tag-${h}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${h}`,tooltip:y,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,Nr)):t.createCommentVNode("",!0),u.value.additionalComponent==="KCopy"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock(V,t.mergeProps(u.value.childAttrs,{key:`${e.item.key}-copy-uuid-${h}`,"data-testid":`${e.item.key}-copy-uuid-${h}`,text:y}),null,16,["data-testid","text"]))),128))],8,Br)):u.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock($,{key:`${e.item.key}-badge-method-${h}`,appearance:Object.values(t.unref($n.BadgeMethodAppearances)).includes(y.toLowerCase())?y.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${h}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,_r)):t.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${n.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock(ht,{key:`json-array-item-${h}`,index:h,"is-array-item":"",item:y},null,8,["index","item"]))),128))],8,Ar)):(t.openBlock(),t.createBlock(q,{key:4,text:t.unref(m)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:g,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(u.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,Sr))],!0)],8,xr)])}}}),yt=Z(Vr,[["__scopeId","data-v-d056663c"]]),Tr={class:"json-config"},$r={key:0,class:"json-endpoint"},bt=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},jsonRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(a=>({"954d3eca":`${o.value}ch`}));const r=e,n=t.computed(()=>r.jsonRecord),o=t.computed(()=>{var a;if(!r.fetcherUrl)return 0;const i=(a=r.fetcherUrl)==null?void 0:a.split("/");return i.length<2?0:41+(r.requestMethod==="post"?i[i.length-1]:i[i.length-2]).length});return(a,i)=>{const l=t.resolveComponent("KBadge"),s=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",Tr,[r.fetcherUrl?(t.openBlock(),t.createElementBlock("div",$r,[t.createVNode(l,{appearance:r.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(s,{id:"json-endpoint-codeblock",code:r.fetcherUrl,"is-single-line":"",language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),r.jsonRecord?(t.openBlock(),t.createBlock(s,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":r.fetcherUrl}),code:JSON.stringify(n.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):t.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function kt(e){return typeof e>"u"||e===null}function jr(e){return typeof e=="object"&&e!==null}function Mr(e){return Array.isArray(e)?e:kt(e)?[]:[e]}function Or(e,r){var n,o,a,i;if(r)for(i=Object.keys(r),n=0,o=i.length;n<o;n+=1)a=i[n],e[a]=r[a];return e}function Fr(e,r){var n="",o;for(o=0;o<r;o+=1)n+=e;return n}function Dr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var qr=kt,vr=jr,Lr=Mr,Kr=Fr,Pr=Dr,Ur=Or,K={isNothing:qr,isObject:vr,toArray:Lr,repeat:Kr,isNegativeZero:Pr,extend:Ur};function Ct(e,r){var n="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(n+=`
|
|
1
|
+
(function(Y,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],t):(Y=typeof globalThis<"u"?globalThis:Y||self,t(Y["kong-ui-public-entities-consumers"]={},Y.Vue,Y.VueRouter,Y["kong-ui-public-i18n"],Y.axios,Y.Kongponents))})(this,function(Y,t,$e,xe,ot,$n){"use strict";const jn={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 Mn(){const e=xe.createI18n("en-us",jn);return{i18n:e,i18nT:xe.i18nTComponent(e)}}const Se={useI18n:Mn},je="/api/runtime_groups/{controlPlaneId}",ce="/{workspace}",ie={list:{konnect:{all:"/v2/control-planes/{controlPlaneId}/core-entities/consumers",forConsumerGroup:"/v2/control-planes/{controlPlaneId}/core-entities/consumer_groups/{consumerGroupId}/consumers",oneForConsumerGroup:"/v2/control-planes/{controlPlaneId}/core-entities/consumer_groups/{consumerGroupId}/consumers/{consumerId}"},kongManager:{all:`${ce}/consumers`,forConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers`,oneForConsumerGroup:`${ce}/consumer_groups/{consumerGroupId}/consumers/{consumerId}`}},form:{konnect:{validate:`${je}/v1/schemas/json/consumer/validate`,create:`${je}/consumers`,edit:`${je}/consumers/{id}`},kongManager:{validate:`${ce}/schemas/consumers/validate`,create:`${ce}/consumers`,edit:`${ce}/consumers/{id}`}}};var at=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(at||{}),Me=(e=>(e.Edit="edit",e.Create="create",e))(Me||{}),le=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(le||{}),D=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(D||{}),H=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(H||{});function On(){return{getAxiosInstance:(e={})=>{try{const r=t.inject("get-axios-instance",void 0);return typeof r=="function"?r(e):ot.create({withCredentials:!0,timeout:3e4,...e})}catch(r){return console.warn("getAxiosInstance:",r.message||r),ot.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var r;return((r=e==null?void 0:e.response)==null?void 0:r.headers["x-datadog-trace-id"])||""}}}function Fn(){return{debounce:(e,r)=>{let n;return(...o)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{e(...o)},r)}}}}const Oe="khcp-user-table-preferences",Dn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function qn(){const e=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(o){console.error("useTablePreferences(tryParseJson)",o);return}},r=()=>{const n=e(localStorage.getItem(Oe));return!n||!Object.keys(n).length?new Map:new Map(Object.entries(n))};return{setTablePreferences:(n,o)=>{try{const a=r();a.set(n,o),localStorage.setItem(Oe,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:n=>{const o=r();return(o==null?void 0:o.get(n))||void 0||Dn},deleteAllTablePreferences:()=>{localStorage.removeItem(Oe)}}}function Fe(e={}){const{getAxiosInstance:r}=On();return{axiosInstance:r(e)}}const vn={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},Ln={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},Kn={actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},Pn={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},Un={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},Rn={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},zn={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Gn={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Hn={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},Jn={global:vn,deleteModal:Ln,baseForm:Kn,baseTable:Pn,baseConfigCard:Un,filter:Rn,debouncedFilter:zn,errors:Gn,toggleModal:Hn};function De(){const e=xe.createI18n("en-us",Jn);return{i18n:e,i18nT:xe.i18nTComponent(e)}}function it(){const e=(n,o)=>(o==null?void 0:o[n])??void 0,r=(n,o)=>{if(n.length!==o.length)return!1;const a=new Set([...n,...o]);for(const i of a){const l=n.filter(c=>c===i).length,s=o.filter(c=>c===i).length;if(l!==s)return!1}return!0};return{getPropValue:e,objectsAreEqual:(n,o,a)=>{if(a){if(Object.keys(n).length===Object.keys(o).length)for(const i in n)if(Array.isArray(n[i])&&Array.isArray(o[i])){if(r(n[i],o[i]))continue;return!1}else{if(n[i]===o[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(n)===JSON.stringify(o)}catch{return!1}},sortAlpha:n=>(o,a)=>{let i=o[n]===void 0||o[n]===null?"":o[n],l=a[n]===void 0||a[n]===null?"":a[n];return Array.isArray(o[n])&&(i=o[n][0]),Array.isArray(a[n])&&(l=a[n][0]),i.localeCompare(l)},isValidUuid:n=>n?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(n):!1}}function Wn(e,r,n,o={fetchedItemsKey:"data",searchKeys:["id"]}){n||(n="1000");const{axiosInstance:a}=Fe({headers:e.requestHeaders}),{i18n:{t:i}}=De(),{debounce:l}=Fn(),s=l(async y=>{await q(y)},200),c=t.ref(!1),d=t.ref(""),p=t.ref(""),u=t.ref([]),g=t.ref([]),m=t.ref(void 0),x=t.unref(r);let C=`${e.apiBaseUrl}${x}`;e.app==="konnect"?C=C.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(C=C.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:S}=it(),$=async()=>{try{c.value=!0;const{data:y}=await a.get(`${C}?size=${n}`);y!=null&&y.next||(m.value=o.fetchedItemsKey in y?y[o.fetchedItemsKey]:[]),g.value=o.fetchedItemsKey in y?y[o.fetchedItemsKey]:[],u.value=g.value}catch{u.value=[],d.value=i("debouncedFilter.errors.fetch")}finally{c.value=!1}},V=t.ref(""),q=async y=>{var h,f,k;if(V.value!==y)if(V.value=y||"",m.value===void 0)try{if(c.value=!0,d.value="",p.value="",e.app==="konnect"){let b=C+"";y&&(b+=`/${y}`);const{data:w}=await a.get(`${b}?size=${n}`);o.fetchedItemsKey in w?u.value=w[o.fetchedItemsKey]:w!=null&&w.id?u.value=[w]:u.value=[]}else if(y){const b=[];S(y)&&o.searchKeys.includes("id")?b.push((async()=>{const{data:I}=await a.get(`${C}/${y}`);return[I[o.fetchedItemsKey]??I]})()):b.push(...o.searchKeys.filter(I=>I!=="id").map(async I=>{const{data:A}=await a.get(`${C}?${I}=${y}`);return A[o.fetchedItemsKey]}));const w=await Promise.all(b),T=new Set;u.value=[],(h=w==null?void 0:w.forEach)==null||h.call(w,I=>{var A;(A=I==null?void 0:I.forEach)==null||A.call(I,N=>{T.has(N.id)||(T.add(N.id),u.value.push(N))})})}else u.value=g.value}catch(b){((f=b==null?void 0:b.response)==null?void 0:f.status)===404?p.value=i("debouncedFilter.errors.invalid"):(u.value=[],d.value=i("debouncedFilter.errors.fetch"))}finally{c.value=!1}else c.value=!0,p.value="",y?(u.value=(k=m.value)==null?void 0:k.filter(b=>{var w;let T=!1;for(const I of o.searchKeys){const A=typeof b[I]=="string"?(w=b[I])==null?void 0:w.toLowerCase():b[I];A!=null&&A.includes(y.toLowerCase())&&(T=!0)}return T}),(!u.value||!u.value.length)&&(p.value=i("debouncedFilter.errors.invalid"))):u.value=m.value,c.value=!1};return{loading:c,error:d,validationError:p,results:u,allRecords:m,loadItems:$,debouncedQueryChange:s}}function Yn(e,r){const n=t.unref(r),o=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${n}`):new URL(n));return o.value.search="",a=>`${o.value.href}/${a}`}function Zn(){const{i18n:{t:e}}=De();return{getMessageFromError:r=>{var n,o,a,i;if(!r)return e("errors.unexpected");if(((n=r==null?void 0:r.response)==null?void 0:n.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=r==null?void 0:r.response)!=null&&o.data){if(r.response.data.detail)return r.response.data.detail;if((a=r.response.data.details)!=null&&a.length)return r.response.data.details.map(l=>{let s=e("errors.unexpected");return l.messages&&typeof l.messages=="object"&&l.messages.length&&(s=l.messages.join(", ")),l.field?`${l.field} - ${s}`:s}).join("; ");if(r.response.data.message){const{message:l}=r.response.data;return Array.isArray(l)?(i=l[0])!=null&&i.constraints?Object.values(l[0].constraints)[0]:l[0]:l}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(l=>`${l} ${r.response.data[l]}`).join(", ")}return r.message||e("errors.unexpected")}}}function Qn(e){const r=window.location.origin,n=r.endsWith("/")?r:`${r}/`;try{const o=e.join("/"),a=`${n}${o}`,i=e.some(l=>l.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!i&&new URL(a))return`${n}${o}`;throw new Error("Invalid url")}catch(o){return console.warn("Failed to build valid URL:",o),""}}function lt(e,r){const n=t.ref(t.unref(e)),o=t.ref(t.unref(r)),a=t.computed(()=>!!(n.value.app==="konnect"||n.value.isExactMatch)),i=t.computed(()=>o.value.startsWith("/")?new URL(`${window.location.origin}${o.value}`):new URL(o.value));return l=>{const{page:s,pageSize:c,offset:d,sortColumnKey:p,sortColumnOrder:u,query:g}=l;try{let m=new URL(i.value.href);return a.value&&g?(m.search="",m=n.value.isExactMatch?new URL(`${m.href}/${g}/`):new URL(`${m.href}?filter[name][contains]=${g}`)):(a.value||new URLSearchParams(g).forEach((x,C)=>{m.searchParams.append(C,x)}),p&&m.searchParams.append("sort_by",p),u==="desc"&&m.searchParams.append("sort_desc","1"),m.searchParams.append("size",String(c))),d&&s!==1&&m.searchParams.append("offset",String(d)),m.href}catch(m){return console.error("RouteList(fetcher)",m),o.value}}}function Xn(e,r,n="data"){var o;const a=t.unref(r),{axiosInstance:i}=Fe({...e.axiosRequestConfig,headers:{...(o=e.axiosRequestConfig)==null?void 0:o.headers,...e.requestHeaders}}),l=lt(e,a),s=t.ref({status:le.Idle});return{fetcher:async c=>{var d;try{s.value={status:le.Loading};let p=l(c);p.includes("filter[name]")&&(p=`${p}&page[size]=${c.pageSize}&page[number]=${c.page}`);const u=await i.get(p);if(u.status>=400)throw u;const g=u.data,m=n&&n.replace(/[^\w-_]/gi,"");let x;g[m]&&Array.isArray(g[m])?x=g[m]:Array.isArray(g)?x=g:x=Object.keys(g).length?[g]:[];const C={data:x,total:x.length,...g.offset?{pagination:{offset:g.offset}}:null};return s.value={status:le.Idle,response:C},C}catch(p){const u={data:[],total:0};return c.query&&(((d=p.response)==null?void 0:d.status)===404||p.status===404)?(s.value={status:le.NoResults,response:u,error:p.response?p:{response:p}},u):(s.value={status:le.Error,response:u,error:p.response?p:{response:p}},u)}},fetcherState:s}}function er(){const e=(n,o="_")=>n?n.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",r=/(?:^|[\s-:'"])\w/g;return{capitalize:n=>n?n.replace(r,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const st=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,ct=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const r=e.match(st);if(!r)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return r.shift(),r},dt=e=>e==="*"||e==="x"||e==="X",ut=e=>{const r=parseInt(e,10);return isNaN(r)?e:r},tr=(e,r)=>typeof e!=typeof r?[String(e),String(r)]:[e,r],nr=(e,r)=>{if(dt(e)||dt(r))return 0;const[n,o]=tr(ut(e),ut(r));return n>o?1:n<o?-1:0},pt=(e,r)=>{for(let n=0;n<Math.max(e.length,r.length);n++){const o=nr(e[n]||"0",r[n]||"0");if(o!==0)return o}return 0},rr=(e,r)=>{const n=ct(e),o=ct(r),a=n.pop(),i=o.pop(),l=pt(n,o);return l!==0?l:a&&i?pt(a.split("."),i.split(".")):a||i?a?-1:1:0},ft=(e,r,n)=>{or(n);const o=rr(e,r);return mt[n].includes(o)},mt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},gt=Object.keys(mt),or=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(gt.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${gt.join("|")}`)},ar=e=>typeof e=="string"&&/^[v\d]/.test(e)&&st.test(e);function ir(e){const{gatewayInfo:r,supportedRange:n}=e;if(!r)return!0;const{edition:o,version:a}=r;if(!ar(a))return console.error("Invalid version"),!1;const i=n[o];if(!i)return!1;const[l,s]=i;return!(l&&ft(a,l,"<")||s&&ft(a,s,">"))}function lr(e){const r=t.ref(0),n=t.ref(0),o=t.ref(!1);return t.watch(e,a=>{a&&!o.value&&(r.value=a.offsetWidth,n.value=a.scrollWidth,o.value=!0)}),{isTruncated:t.computed(()=>r.value<n.value)}}const P={useAxios:Fe,useDebouncedFilter:Wn,useDeleteUrlBuilder:Yn,useErrors:Zn,useExternalLinkCreator:Qn,useFetcher:Xn,useFetchUrlBuilder:lt,useHelpers:it,useStringHelpers:er,useI18n:De,useGatewayFeatureSupported:ir,useTruncationDetector:lr},sr={key:0,class:"config-card-fieldset-title"},cr=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const r=e,{i18n:{t:n}}=P.useI18n(),{convertKeyToTitle:o}=P.useStringHelpers(),a=t.computed(()=>r.item.key??"json-array-item"),i=t.computed(()=>r.item.value??r.item),l=t.computed(()=>{const c=JSON.parse(JSON.stringify(i.value));return r.isArrayItem&&delete c.name,c}),s=t.computed(()=>{var c;return r.isArrayItem?(c=i.value)!=null&&c.name?o(i.value.name,"_"):n("baseConfigCard.general.entryTitle",{index:r.index}):""});return(c,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",sr,[t.createElementVNode("b",null,t.toDisplayString(s.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(l.value),(p,u)=>(t.openBlock(),t.createBlock(yt,{key:`${a.value}-property-${u}`,item:{key:p,label:t.unref(o)(p),value:l.value[p]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),Z=(e,r)=>{const n=e.__vccOpts||e;for(const[o,a]of r)n[o]=a;return n},ht=Z(cr,[["__scopeId","data-v-68ca83ec"]]),dr=t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:r}}=P.useI18n();return(n,o)=>{const a=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(a,{appearance:"tertiary",class:"navigation-button",onClick:o[0]||(o[0]=i=>n.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(r)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),ur=Z(dr,[["__scopeId","data-v-c96811e5"]]),pr=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:r}}=P.useI18n();return(n,o)=>{const a=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(a,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(r)("baseConfigCard.statusBadge.enabledLabel"):t.unref(r)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),fr="#0044f4",mr="#e0e4ea",gr="#3a3f51",hr="#afb7c5",yr="1px",br="20px",kr={class:"config-card-details-row"},Cr=["data-testid"],wr=["data-testid"],xr=["data-testid"],Sr=["data-testid"],Ir={key:1},Nr=["data-testid"],Br=["data-testid"],_r=["data-testid"],Ar=["data-testid"],Er={name:"ConfigCardItem",components:{JsonCardItem:ht,StatusBadge:pr,InternalLinkItem:ur}},Vr=t.defineComponent({...Er,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:r}){t.useCssVars(x=>({"07753575":p.value?"none":`solid ${t.unref(yr)} ${t.unref(mr)}`,"32d44ea8":d.value&&s.value?"block":"flex","5036b738":d.value&&s.value?"100%":n.slim?"50%":"25%","5038fd13":d.value&&s.value?"100%":n.slim?"50%":"75%"}));const n=e,o=r,a=t.useSlots(),{i18n:{t:i,formatUnixTimeStamp:l}}=P.useI18n(),s=t.computed(()=>n.item.value!==void 0&&n.item.value!==null&&n.item.value!==""),c=t.computed(()=>!!(n.item.tooltip||a["label-tooltip"])),d=t.computed(()=>n.item.type===D.Json||n.item.type===D.JsonArray),p=t.computed(()=>n.item.type===D.JsonArray),u=t.computed(()=>{switch(n.item.type){case D.ID:return{tag:"KCopy",attrs:{"data-testid":`${n.item.key}-copy-uuid`,"copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label}),text:n.item.value}};case D.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label})}};case D.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${n.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label}),text:n.item.value}};case D.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":i("baseConfigCard.copy.tooltip",{label:n.item.label})}};case D.Date:return{tag:"div",attrs:{"data-testid":`${n.item.key}-date`},text:l(n.item.value)};case D.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${n.item.key}-badge-status`,status:n.item.value}};case D.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case D.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case D.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${n.item.key}-internal-link`,item:n.item,onNavigationClick:x=>{o("navigation-click",x)}}};case D.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${n.item.key}-external-link`,href:n.item.value},text:n.item.value};case D.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-content`,item:n.item}};case D.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${n.item.key}-json-array-content`,item:n.item}};default:return{tag:"div",attrs:{"data-testid":`${n.item.key}-plain-text`},text:n.item.value}}}),g=t.ref(),{isTruncated:m}=P.useTruncationDetector(g);return(x,C)=>{const S=t.resolveComponent("KLabel"),$=t.resolveComponent("KBadge"),V=t.resolveComponent("KCopy"),q=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("div",kr,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(x.$slots,"label",{item:e.item},()=>[t.createVNode(S,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.label)+" ",1)]),_:2},[c.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(x.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,wr)]),key:"0"}:void 0]),1024)],!0)],8,Cr),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(x.$slots,e.item.key,{rowValue:e.item.value},()=>[s.value?(t.openBlock(),t.createElementBlock("div",Ir,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.value.tag),t.normalizeProps(t.guardReactiveProps(u.value.attrs)),{default:t.withCtx(()=>[u.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock($,{key:`${e.item.key}-badge-tag-${h}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${h}`,tooltip:y,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,Nr)):t.createCommentVNode("",!0),u.value.additionalComponent==="KCopy"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock(V,t.mergeProps(u.value.childAttrs,{key:`${e.item.key}-copy-uuid-${h}`,"data-testid":`${e.item.key}-copy-uuid-${h}`,text:y}),null,16,["data-testid","text"]))),128))],8,Br)):u.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock($,{key:`${e.item.key}-badge-method-${h}`,appearance:Object.values(t.unref($n.BadgeMethodAppearances)).includes(y.toLowerCase())?y.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${h}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,_r)):t.createCommentVNode("",!0),u.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${n.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(y,h)=>(t.openBlock(),t.createBlock(ht,{key:`json-array-item-${h}`,index:h,"is-array-item":"",item:y},null,8,["index","item"]))),128))],8,Ar)):(t.openBlock(),t.createBlock(q,{key:4,text:t.unref(m)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:g,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(u.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,Sr))],!0)],8,xr)])}}}),yt=Z(Vr,[["__scopeId","data-v-d056663c"]]),Tr={class:"json-config"},$r={key:0,class:"json-endpoint"},bt=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},jsonRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(a=>({"954d3eca":`${o.value}ch`}));const r=e,n=t.computed(()=>r.jsonRecord),o=t.computed(()=>{var a;if(!r.fetcherUrl)return 0;const i=(a=r.fetcherUrl)==null?void 0:a.split("/");return i.length<2?0:41+(r.requestMethod==="post"?i[i.length-1]:i[i.length-2]).length});return(a,i)=>{const l=t.resolveComponent("KBadge"),s=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",Tr,[r.fetcherUrl?(t.openBlock(),t.createElementBlock("div",$r,[t.createVNode(l,{appearance:r.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(s,{id:"json-endpoint-codeblock",code:r.fetcherUrl,"is-single-line":"",language:"json",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),r.jsonRecord?(t.openBlock(),t.createBlock(s,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":r.fetcherUrl}),code:JSON.stringify(n.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):t.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function kt(e){return typeof e>"u"||e===null}function jr(e){return typeof e=="object"&&e!==null}function Mr(e){return Array.isArray(e)?e:kt(e)?[]:[e]}function Or(e,r){var n,o,a,i;if(r)for(i=Object.keys(r),n=0,o=i.length;n<o;n+=1)a=i[n],e[a]=r[a];return e}function Fr(e,r){var n="",o;for(o=0;o<r;o+=1)n+=e;return n}function Dr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var qr=kt,vr=jr,Lr=Mr,Kr=Fr,Pr=Dr,Ur=Or,K={isNothing:qr,isObject:vr,toArray:Lr,repeat:Kr,isNegativeZero:Pr,extend:Ur};function Ct(e,r){var n="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(n+=`
|
|
2
2
|
|
|
3
3
|
`+e.mark.snippet),o+" "+n):o}function he(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=Ct(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}he.prototype=Object.create(Error.prototype),he.prototype.constructor=he,he.prototype.toString=function(e){return this.name+": "+Ct(this,e)};var G=he;function qe(e,r,n,o,a){var i="",l="",s=Math.floor(a/2)-1;return o-r>s&&(i=" ... ",r=o-s+i.length),n-o>s&&(l=" ...",n=o+s-l.length),{str:i+e.slice(r,n).replace(/\t/g,"→")+l,pos:o-r+i.length}}function ve(e,r){return K.repeat(" ",r-e.length)+e}function Rr(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var n=/\r?\n|\r|\0/g,o=[0],a=[],i,l=-1;i=n.exec(e.buffer);)a.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);var s="",c,d,p=Math.min(e.line+r.linesAfter,a.length).toString().length,u=r.maxLength-(r.indent+p+3);for(c=1;c<=r.linesBefore&&!(l-c<0);c++)d=qe(e.buffer,o[l-c],a[l-c],e.position-(o[l]-o[l-c]),u),s=K.repeat(" ",r.indent)+ve((e.line-c+1).toString(),p)+" | "+d.str+`
|
|
4
4
|
`+s;for(d=qe(e.buffer,o[l],a[l],e.position,u),s+=K.repeat(" ",r.indent)+ve((e.line+1).toString(),p)+" | "+d.str+`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-consumers",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-consumers.umd.js",
|
|
6
6
|
"module": "./dist/entities-consumers.es.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"errorLimit": "500KB"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@kong-ui-public/entities-shared": "^2.12.
|
|
53
|
+
"@kong-ui-public/entities-shared": "^2.12.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"dev": "cross-env USE_SANDBOX=true vite",
|