@kong-ui-public/entities-shared 3.30.4 → 3.30.5
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.
- package/dist/entities-shared.es.js +247 -246
- package/dist/entities-shared.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts +3 -1
- package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts +2 -0
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts.map +1 -1
- package/dist/types/types/entity-base-config-card.d.ts +1 -1
- package/dist/types/types/entity-base-config-card.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(E,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","@kong/icons","vue-router"],t):(E=typeof globalThis<"u"?globalThis:E||self,t(E["kong-ui-public-entities-shared"]={},E.Vue,E.axios,E["kong-ui-public-i18n"],E.Kongponents,E.KongIcons,E.VueRouter))})(this,function(E,t,Ye,We,le,ee,yn){"use strict";var ze=(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.Secret="secret",e.RedisConfiguration="redis configuration",e))(ze||{}),Je=(e=>(e.Edit="edit",e.Create="create",e))(Je||{}),G=(e=>(e[e.InitialLoad=0]="InitialLoad",e[e.Loading=1]="Loading",e[e.Idle=2]="Idle",e[e.NoResults=3]="NoResults",e[e.NoRecords=4]="NoRecords",e[e.Error=5]="Error",e))(G||{}),me=(e=>(e.CaCertificate="ca_certificate",e.Certificate="certificate",e.Consumer="consumer",e.ConsumerGroup="consumer_group",e.GatewayService="service",e.Key="key",e.KeySet="set",e.Plugin="plugin",e.Route="route",e.SNI="sni",e.Upstream="upstream",e.Target="target",e.Vault="vault",e.RedisConfiguration="redis_configuration",e.BackendCluster="backend_cluster",e.VirtualCluster="virtual_cluster",e.Listener="listener",e.Policy="policy",e.Other="other",e))(me||{});const ce=Object.values(me);var O=(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.CopyBadge="copy-badge",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(O||{}),Y=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(Y||{});const we=["primary","secondary"];function bn(){return{getAxiosInstance:(e={})=>{try{const n=t.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):Ye.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),Ye.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var n;return((n=e==null?void 0:e.response)==null?void 0:n.headers["x-datadog-trace-id"])||""}}}function Cn(){return{debounce:(e,n)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},n)}}}}const Ae="khcp-user-table-preferences",kn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnVisibility:{}};function xn(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},n=()=>{const r=e(localStorage.getItem(Ae));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=n();o.set(r,i),localStorage.setItem(Ae,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:(r,i)=>{const o=n();return(o==null?void 0:o.get(r))||void 0||i||kn},deleteAllTablePreferences:()=>{localStorage.removeItem(Ae)}}}function Be(e={}){const{getAxiosInstance:n}=bn();return{axiosInstance:n(e)}}const Sn={global:{actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},deleteModal:{message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},baseForm:{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",terraform:"Terraform"},errors:{edit:"The entity could not be edited at this time."}},baseTable:{emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},baseConfigCard:{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",partial_label:"Redis Configuration"},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"}},emptyState:{learnMore:"Learn more",pricingTitle:"Pricing: "},filter:{filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},debouncedFilter:{errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},errors:{unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},validationErrors:{utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},toggleModal:{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"}}};function he(){const e=We.createI18n("en-us",Sn);return{i18n:e,i18nT:We.i18nTComponent(e)}}function Ge(){const e=(l,a)=>(a==null?void 0:a[l])??void 0,n=(l,a)=>{if(l.length!==a.length)return!1;const c=new Set([...l,...a]);for(const s of c){const d=l.filter(u=>u===s).length,f=a.filter(u=>u===s).length;if(d!==f)return!1}return!0};return{getPropValue:e,objectsAreEqual:(l,a,c)=>{if(c){if(Object.keys(l).length===Object.keys(a).length)for(const s in l)if(Array.isArray(l[s])&&Array.isArray(a[s])){if(n(l[s],a[s]))continue;return!1}else{if(l[s]===a[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(l)===JSON.stringify(a)}catch{return!1}},sortAlpha:l=>(a,c)=>{let s=a[l]===void 0||a[l]===null?"":a[l],d=c[l]===void 0||c[l]===null?"":c[l];return Array.isArray(a[l])&&(s=a[l][0]),Array.isArray(c[l])&&(d=c[l][0]),s.localeCompare(d)},isValidUuid:l=>l?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(l):!1}}function wn(e,n,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=Be(e.axiosRequestConfig),{i18n:{t:l}}=he(),{debounce:a}=Cn(),c=a(async T=>{await k(T)},200),s=t.ref(!1),d=t.ref(""),f=t.ref(""),u=t.ref([]),g=t.ref([]),m=t.ref(void 0),y=t.computed(()=>{const T=`${e.apiBaseUrl}${t.unref(n)}`;return e.app==="konnect"?T.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"?T.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""):T}),{isValidUuid:b}=Ge(),C=async()=>{try{s.value=!0;const{data:T}=await o.get(`${y.value}?size=${r}`);T!=null&&T.next||(m.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[]),g.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[],u.value=g.value}catch{u.value=[],d.value=l("debouncedFilter.errors.fetch")}finally{s.value=!1}},B=t.ref(""),k=async T=>{var F,H,w;if(B.value!==T){if(B.value=T??"",!T){u.value=g.value;return}if(m.value===void 0)try{if(s.value=!0,d.value="",f.value="",e.app==="konnect"){const A=`${y.value}/${T}`,{data:p}=await o.get(`${A}?size=${r}`);i.fetchedItemsKey in p?u.value=p[i.fetchedItemsKey]:p!=null&&p[i.exactMatchKey??"id"]?u.value=[p]:u.value=[]}else{const A=[];b(T)&&i.searchKeys.includes("id")?A.push((async()=>{const{data:x}=await o.get(`${y.value}/${T}`);return[x[i.fetchedItemsKey]??x]})()):A.push(...i.searchKeys.filter(x=>x!=="id").map(async x=>{const{data:S}=await o.get(`${y.value}?${x}=${T}`);return S[i.fetchedItemsKey]}));const p=await Promise.all(A),h=new Set;u.value=[],(F=p==null?void 0:p.forEach)==null||F.call(p,x=>{var S;(S=x==null?void 0:x.forEach)==null||S.call(x,I=>{h.has(I.id)||(h.add(I.id),u.value.push(I))})})}}catch(A){((H=A==null?void 0:A.response)==null?void 0:H.status)===404?f.value=l("debouncedFilter.errors.invalid"):(u.value=[],d.value=l("debouncedFilter.errors.fetch"))}finally{s.value=!1}else s.value=!0,f.value="",u.value=(w=m.value)==null?void 0:w.filter(A=>{var h;let p=!1;for(const x of i.searchKeys){const S=typeof A[x]=="string"?(h=A[x])==null?void 0:h.toLowerCase():A[x];S!=null&&S.includes(T.toLowerCase())&&(p=!0)}return p}),(!u.value||!u.value.length)&&(f.value=l("debouncedFilter.errors.invalid")),s.value=!1}};return{loading:s,error:d,validationError:f,results:u,allRecords:m,loadItems:C,debouncedQueryChange:c}}function An(e,n){const r=t.unref(n),i=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function Bn(){const{i18n:{t:e}}=he();return{getErrorFieldsFromError:i=>{var a,c,s;if(!i)return{messages:[e("errors.unexpected")],fields:[]};if(((a=i==null?void 0:i.response)==null?void 0:a.status)===401)return{messages:[],fields:[]};let o=[e("errors.unexpected")];const l=[];if((c=i==null?void 0:i.response)!=null&&c.data){if((s=i.response.data.details)!=null&&s.length)return o=[],i.response.data.details.forEach(d=>{let f=e("errors.unexpected");d.messages&&Array.isArray(d.messages)&&d.messages.length&&(f=d.messages.join(", ")),d.field&&l.push({field:d.field,message:f}),o.push(`${d.field??""} ${f}`)}),{messages:o,fields:l};if(i.response.data.message&&Array.isArray(i.response.data.message))return o=[],i.response.data.message.forEach(d=>{if(d!=null&&d.constraints){const f=Object.values(d.constraints).join(", ");o.push(f),d.property&&l.push({field:d.property,message:f})}else d!=null&&d.property&&(d!=null&&d.message)?(l.push({field:d.property,message:d.message}),o.push(d.message)):o.push(d)}),{messages:o,fields:l};if(typeof i.response.data.message=="string"||typeof i.response.data=="string")return{messages:[i.response.data.message],fields:[]};if(typeof i.response.data=="object")return o=[],Object.keys(i.response.data).forEach(d=>{l.push({field:d,message:i.response.data[d]}),o.push(i.response.data[d])}),{messages:o,fields:l}}return{messages:[i.message||e("errors.unexpected")],fields:[]}},getMessageFromError:i=>{var o,l,a,c;if(!i)return e("errors.unexpected");if(((o=i==null?void 0:i.response)==null?void 0:o.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((l=i==null?void 0:i.response)!=null&&l.data){if(i.response.data.detail)return i.response.data.detail;if((a=i.response.data.details)!=null&&a.length)return i.response.data.details.map(s=>{let d=e("errors.unexpected");return s.messages&&typeof s.messages=="object"&&s.messages.length&&(d=s.messages.join(", ")),s.field?`${s.field} - ${d}`:d}).join("; ");if(i.response.data.message){const{message:s}=i.response.data;return Array.isArray(s)?(c=s[0])!=null&&c.constraints?Object.values(s[0].constraints)[0]:s[0]:s}if(typeof i.response.data=="string")return i.response.data;if(typeof i.response.data=="object")return Object.keys(i.response.data).map(s=>`${s} ${i.response.data[s]}`).join(", ")}return i.message||e("errors.unexpected")}}}function _n(e){const n=window.location.origin,r=n.endsWith("/")?n:`${n}/`;try{const i=e.join("/"),o=`${r}${i}`,l=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!l&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function Qe(e,n){const r=t.computed(()=>{const o=t.toValue(e);return o.app==="konnect"||!!o.isExactMatch}),i=t.computed(()=>{const o=t.toValue(n);return o.startsWith("/")?new URL(`${window.location.origin}${o}`):new URL(o)});return o=>{const{page:l,pageSize:a,offset:c,sortColumnKey:s,sortColumnOrder:d,query:f}=o;try{let u=new URL(i.value.href);return r.value&&f?(u.search="",u=t.toValue(e).isExactMatch?new URL(`${u.href}/${f}`):new URL(`${u.href}?filter[name][contains]=${f}`)):(r.value||new URLSearchParams(f).forEach((g,m)=>{u.searchParams.append(m,g)}),s&&u.searchParams.append("sort_by",s),d==="desc"&&u.searchParams.append("sort_desc","1"),u.searchParams.append("size",String(a))),c&&l!==1&&u.searchParams.append("offset",String(c)),u.href}catch(u){return console.error("RouteList(fetcher)",u),t.toValue(n)}}}const Ze=new Map;function En(e,n,r){const i=t.ref(!0),o=t.toValue(e),{axiosInstance:l}=Be(o.axiosRequestConfig),a=Qe(e,n),c=t.ref({status:G.Idle}),s=async u=>{var m;const g=t.toValue(r)||"data";try{c.value=i.value?{status:G.InitialLoad}:{status:G.Loading},i.value=!1;let y=a(u);y.includes("filter[name]")&&(y=`${y}&page[size]=${u.pageSize}&page[number]=${u.page}`);const b=await l.get(y);if(b.status>=400)throw b;const C=b.data,B=g&&g.replace(/[^\w-_]/gi,"");let k;C[B]?k=Array.isArray(C[B])?C[B]:[C[B]]:Array.isArray(C)?k=C:k=Object.keys(C).length?[C]:[];const T={data:k,total:k.length,...C.offset?{pagination:{offset:C.offset}}:null};return T.data.length===0&&!u.query?c.value={status:G.NoRecords,response:T}:c.value={status:G.Idle,response:T},T}catch(y){const b={data:[],total:0};return u.query&&(((m=y.response)==null?void 0:m.status)===404||y.status===404)?(c.value={status:G.NoResults,response:b,error:y.response?y:{response:y}},b):(c.value={status:G.Error,response:b,error:y.response?y:{response:y}},b)}},d=o.cacheIdentifier,f=Xe(d);return{fetcher:s,fetcherState:c,fetcherCacheKey:f}}function Xe(e){if(e){let n=Ze.get(e);return n||(n=t.ref(1),Ze.set(e,n)),n}return t.ref(1)}function Tn(){const e=(i,o="_")=>i?i.split(o).map(l=>l.toLowerCase()==="id"?l.toUpperCase():l.charAt(0).toUpperCase()+l.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:i=>i?i.replace(n,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const et=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,tt=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(et);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},nt=e=>e==="*"||e==="x"||e==="X",rt=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},$n=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],Nn=(e,n)=>{if(nt(e)||nt(n))return 0;const[r,i]=$n(rt(e),rt(n));return r>i?1:r<i?-1:0},it=(e,n)=>{for(let r=0;r<Math.max(e.length,n.length);r++){const i=Nn(e[r]||"0",n[r]||"0");if(i!==0)return i}return 0},Fn=(e,n)=>{const r=tt(e),i=tt(n),o=r.pop(),l=i.pop(),a=it(r,i);return a!==0?a:o&&l?it(o.split("."),l.split(".")):o||l?o?-1:1:0},ot=(e,n,r)=>{In(r);const i=Fn(e,n);return at[r].includes(i)},at={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},lt=Object.keys(at),In=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(lt.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${lt.join("|")}`)},On=e=>typeof e=="string"&&/^[v\d]/.test(e)&&et.test(e);function Ln(e){const{gatewayInfo:n,supportedRange:r}=e;if(!n)return!0;const{edition:i,version:o}=n;if(!On(o))return console.error("Invalid version"),!1;const l=r[i];if(!l)return!1;const[a,c]=l;return!(a&&ot(o,a,"<")||c&&ot(o,c,">"))}function Vn(e){const n=t.ref(0),r=t.ref(0),i=t.ref(!1);return t.watch(e,l=>{l&&!i.value&&(n.value=l.offsetWidth,r.value=l.scrollWidth,i.value=!0)}),{isTruncated:t.computed(()=>n.value<r.value)}}function Dn(){const{i18n:{t:e}}=he();return{utf8Name:r=>/^[\p{N}\p{L}.\-_~]*$/u.test(r)?"":e("validationErrors.utf8Name")}}const _e=Symbol("schema"),Rn=e=>{t.provide(_e,e)},Kn=e=>{var o,l;const n=t.inject(_e,void 0),r=(l=(o=n==null?void 0:n.value)==null?void 0:o.fields)==null?void 0:l.find(a=>Object.keys(a)[0]===e),i=t.toRef(r==null?void 0:r[e]);return t.provide(_e,i),i};function Mn(e){let n="";const r=t.ref(!1),i=t.ref(null),o=t.computed(()=>{let a;return r.value?a=!0:i.value?a=i.value.hasData||e&&t.toValue(e):a=!1,!a});return{tableState:i,hasRecords:r,hideTableToolbar:o,handleStateChange:a=>{a.hasData?r.value=!0:a.state==="success"&&!a.hasData&&(!e||!n)&&(r.value=!1),e&&(n=t.toValue(e)),i.value={...a}}}}const L={useAxios:Be,useDebouncedFilter:wn,useDeleteUrlBuilder:An,useErrors:Bn,useExternalLinkCreator:_n,useFetcher:En,useFetcherCacheKey:Xe,useFetchUrlBuilder:Qe,useHelpers:Ge,useStringHelpers:Tn,useI18n:he,useGatewayFeatureSupported:Ln,useTruncationDetector:Vn,useValidators:Dn,useSchemaProvider:Rn,useSubSchema:Kn,useTableState:Mn},jn={key:0,class:"config-card-fieldset-title"},vn=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:r}}=L.useI18n(),{convertKeyToTitle:i}=L.useStringHelpers(),o=t.computed(()=>n.item.key??"json-array-item"),l=t.computed(()=>n.item.value??n.item),a=t.computed(()=>{const s=JSON.parse(JSON.stringify(l.value));return n.isArrayItem&&delete s.name,s}),c=t.computed(()=>{var s;return n.isArrayItem?(s=l.value)!=null&&s.name?i(l.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:n.index}):""});return(s,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",jn,[t.createElementVNode("b",null,t.toDisplayString(c.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(a.value),(f,u)=>(t.openBlock(),t.createBlock(Ee,{key:`${o.value}-property-${u}`,item:{key:f,label:t.unref(i)(f),value:a.value[f]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),W=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},ct=W(vn,[["__scopeId","data-v-dc1e39a1"]]),st=W(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=L.useI18n();return(r,i)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=l=>r.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-2feb8c2e"]]),Pn=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=L.useI18n();return(r,i)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Un="#0044f4",qn="#e0e4ea",Hn="#afb7c5",Yn="#0044f4",Wn="1px",zn="16px",Jn="20px",Gn={class:"config-card-details-row"},Qn=["data-testid"],Zn=["data-testid"],Xn=["data-testid"],er=["data-testid"],tr={key:1},nr=["data-testid"],rr=["data-testid"],ir=["data-testid"],or=["data-testid"],ar={name:"ConfigCardItem",components:{JsonCardItem:ct,StatusBadge:Pn,InternalLinkItem:st}},lr=t.defineComponent({...ar,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:n}){t.useCssVars(F=>({"70f369b3":g.value?"none":`solid ${t.unref(Wn)} ${t.unref(qn)}`,"67c2fae6":u.value&&d.value?"block":"flex","847b138c":u.value&&d.value?"100%":r.slim?"50%":"25%","847687d6":u.value&&d.value?"100%":r.slim?"50%":"75%"}));const r=e,i=n,o=t.useId(),l=t.useSlots(),{i18n:{t:a,formatIsoDate:c,formatUnixTimeStamp:s}}=L.useI18n(),d=t.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),f=t.computed(()=>!!(r.item.tooltip||l["label-tooltip"])),u=t.computed(()=>r.item.type===O.Json||r.item.type===O.JsonArray),g=t.computed(()=>r.item.type===O.JsonArray),m=L.useSubSchema(r.item.key),y=t.computed(()=>{var F;return r.item.type?r.item.type:(F=m==null?void 0:m.value)!=null&&F.encrypted?O.Redacted:void 0}),b=t.computed(()=>{switch(y.value){case O.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case O.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case O.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case O.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case O.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:isNaN(Number(r.item.value))?c(r.item.value):s(r.item.value)};case O.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case O.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case O.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:r.item.value}};case O.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case O.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:F=>{i("navigation-click",F)}}};case O.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case O.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case O.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return r.item.value!=null&&typeof r.item.value=="object"?{tag:"KCodeBlock",attrs:{"data-testid":`${r.item.key}-json-code`,id:`json-code-${o}`,language:"json",code:JSON.stringify(r.item.value,null," "),maxHeight:"480px",showLineNumbers:!1}}:{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),C=t.ref(),B=t.ref(),{isTruncated:k}=L.useTruncationDetector(C),{isTruncated:T}=L.useTruncationDetector(B);return(F,H)=>{const w=t.resolveComponent("KTooltip"),A=t.resolveComponent("KLabel"),p=t.resolveComponent("KBadge"),h=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",Gn,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(F.$slots,"label",{item:e.item},()=>[t.createVNode(A,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createVNode(w,{text:t.unref(k)?e.item.label:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"labelContent",ref:C,class:"label-content"},t.toDisplayString(e.item.label),513)]),_:1},8,["text"])]),_:2},[f.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(F.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,Zn)]),key:"0"}:void 0]),1024)],!0)],8,Qn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(F.$slots,e.item.key,{rowValue:e.item.value},()=>[d.value?(t.openBlock(),t.createElementBlock("div",tr,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(b.value.tag),t.normalizeProps(t.guardReactiveProps(b.value.attrs)),{default:t.withCtx(()=>[b.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,(x,S)=>(t.openBlock(),t.createBlock(p,{key:`${e.item.key}-badge-tag-${S}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${S}`,tooltip:x,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,nr)):b.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,(x,S)=>(t.openBlock(),t.createBlock(h,t.mergeProps({ref_for:!0},b.value.childAttrs,{key:`${e.item.key}-copy-uuid-${S}`,"data-testid":`${e.item.key}-copy-uuid-${S}`,text:x}),null,16,["data-testid","text"]))),128))],8,rr)):b.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,(x,S)=>(t.openBlock(),t.createBlock(p,{key:`${e.item.key}-badge-method-${S}`,appearance:Object.values(t.unref(le.BadgeMethodAppearances)).includes(x.toLowerCase())?x.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${S}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,ir)):b.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(x,S)=>(t.openBlock(),t.createBlock(ct,{key:`json-array-item-${S}`,index:S,"is-array-item":"",item:x},null,8,["index","item"]))),128))],8,or)):(t.openBlock(),t.createBlock(w,{key:4,text:t.unref(T)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:B,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(b.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,er))],!0)],8,Xn)])}}}),Ee=W(lr,[["__scopeId","data-v-66d61bea"]]),cr={class:"json-config config-card-code-block"},sr={key:0,class:"json-endpoint"},Te=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(o=>({eca0976a:`${i.value}ch`}));const n=e,r=t.computed(()=>n.entityRecord),i=t.computed(()=>{var a;if(!n.fetcherUrl)return 0;const o=(a=n.fetcherUrl)==null?void 0:a.split("/");return o.length<2?0:41+(n.requestMethod==="post"?o[o.length-1]:o[o.length-2]).length});return(o,l)=>{const a=t.resolveComponent("KBadge"),c=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",cr,[n.fetcherUrl?(t.openBlock(),t.createElementBlock("div",sr,[t.createVNode(a,{appearance:n.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(c,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),n.entityRecord?(t.openBlock(),t.createBlock(c,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.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 dt(e){return typeof e>"u"||e===null}function dr(e){return typeof e=="object"&&e!==null}function ur(e){return Array.isArray(e)?e:dt(e)?[]:[e]}function fr(e,n){var r,i,o,l;if(n)for(l=Object.keys(n),r=0,i=l.length;r<i;r+=1)o=l[r],e[o]=n[o];return e}function pr(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function mr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var hr=dt,gr=dr,yr=ur,br=pr,Cr=mr,kr=fr,R={isNothing:hr,isObject:gr,toArray:yr,repeat:br,isNegativeZero:Cr,extend:kr};function ut(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
|
|
1
|
+
(function(E,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","@kong/icons","vue-router"],t):(E=typeof globalThis<"u"?globalThis:E||self,t(E["kong-ui-public-entities-shared"]={},E.Vue,E.axios,E["kong-ui-public-i18n"],E.Kongponents,E.KongIcons,E.VueRouter))})(this,function(E,t,Ye,We,le,ee,yn){"use strict";var ze=(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.Secret="secret",e.RedisConfiguration="redis configuration",e))(ze||{}),Je=(e=>(e.Edit="edit",e.Create="create",e))(Je||{}),G=(e=>(e[e.InitialLoad=0]="InitialLoad",e[e.Loading=1]="Loading",e[e.Idle=2]="Idle",e[e.NoResults=3]="NoResults",e[e.NoRecords=4]="NoRecords",e[e.Error=5]="Error",e))(G||{}),me=(e=>(e.CaCertificate="ca_certificate",e.Certificate="certificate",e.Consumer="consumer",e.ConsumerGroup="consumer_group",e.GatewayService="service",e.Key="key",e.KeySet="set",e.Plugin="plugin",e.Route="route",e.SNI="sni",e.Upstream="upstream",e.Target="target",e.Vault="vault",e.Partial="partial",e.BackendCluster="backend_cluster",e.VirtualCluster="virtual_cluster",e.Listener="listener",e.Policy="policy",e.Other="other",e))(me||{});const ce=Object.values(me);var O=(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.CopyBadge="copy-badge",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(O||{}),Y=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(Y||{});const we=["primary","secondary"];function bn(){return{getAxiosInstance:(e={})=>{try{const n=t.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):Ye.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),Ye.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var n;return((n=e==null?void 0:e.response)==null?void 0:n.headers["x-datadog-trace-id"])||""}}}function Cn(){return{debounce:(e,n)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},n)}}}}const Ae="khcp-user-table-preferences",kn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnVisibility:{}};function xn(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},n=()=>{const r=e(localStorage.getItem(Ae));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=n();o.set(r,i),localStorage.setItem(Ae,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:(r,i)=>{const o=n();return(o==null?void 0:o.get(r))||void 0||i||kn},deleteAllTablePreferences:()=>{localStorage.removeItem(Ae)}}}function Be(e={}){const{getAxiosInstance:n}=bn();return{axiosInstance:n(e)}}const Sn={global:{actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},deleteModal:{message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},baseForm:{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",terraform:"Terraform"},errors:{edit:"The entity could not be edited at this time."}},baseTable:{emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},baseConfigCard:{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",partial_label:"Redis Configuration"},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"}},emptyState:{learnMore:"Learn more",pricingTitle:"Pricing: "},filter:{filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},debouncedFilter:{errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},errors:{unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},validationErrors:{utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},toggleModal:{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"}}};function he(){const e=We.createI18n("en-us",Sn);return{i18n:e,i18nT:We.i18nTComponent(e)}}function Ge(){const e=(l,a)=>(a==null?void 0:a[l])??void 0,n=(l,a)=>{if(l.length!==a.length)return!1;const c=new Set([...l,...a]);for(const s of c){const d=l.filter(u=>u===s).length,f=a.filter(u=>u===s).length;if(d!==f)return!1}return!0};return{getPropValue:e,objectsAreEqual:(l,a,c)=>{if(c){if(Object.keys(l).length===Object.keys(a).length)for(const s in l)if(Array.isArray(l[s])&&Array.isArray(a[s])){if(n(l[s],a[s]))continue;return!1}else{if(l[s]===a[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(l)===JSON.stringify(a)}catch{return!1}},sortAlpha:l=>(a,c)=>{let s=a[l]===void 0||a[l]===null?"":a[l],d=c[l]===void 0||c[l]===null?"":c[l];return Array.isArray(a[l])&&(s=a[l][0]),Array.isArray(c[l])&&(d=c[l][0]),s.localeCompare(d)},isValidUuid:l=>l?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(l):!1}}function wn(e,n,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=Be(e.axiosRequestConfig),{i18n:{t:l}}=he(),{debounce:a}=Cn(),c=a(async T=>{await k(T)},200),s=t.ref(!1),d=t.ref(""),f=t.ref(""),u=t.ref([]),g=t.ref([]),m=t.ref(void 0),y=t.computed(()=>{const T=`${e.apiBaseUrl}${t.unref(n)}`;return e.app==="konnect"?T.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"?T.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""):T}),{isValidUuid:b}=Ge(),C=async()=>{try{s.value=!0;const{data:T}=await o.get(`${y.value}?size=${r}`);T!=null&&T.next||(m.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[]),g.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[],u.value=g.value}catch{u.value=[],d.value=l("debouncedFilter.errors.fetch")}finally{s.value=!1}},B=t.ref(""),k=async T=>{var F,H,w;if(B.value!==T){if(B.value=T??"",!T){u.value=g.value;return}if(m.value===void 0)try{if(s.value=!0,d.value="",f.value="",e.app==="konnect"){const A=`${y.value}/${T}`,{data:p}=await o.get(`${A}?size=${r}`);i.fetchedItemsKey in p?u.value=p[i.fetchedItemsKey]:p!=null&&p[i.exactMatchKey??"id"]?u.value=[p]:u.value=[]}else{const A=[];b(T)&&i.searchKeys.includes("id")?A.push((async()=>{const{data:x}=await o.get(`${y.value}/${T}`);return[x[i.fetchedItemsKey]??x]})()):A.push(...i.searchKeys.filter(x=>x!=="id").map(async x=>{const{data:S}=await o.get(`${y.value}?${x}=${T}`);return S[i.fetchedItemsKey]}));const p=await Promise.all(A),h=new Set;u.value=[],(F=p==null?void 0:p.forEach)==null||F.call(p,x=>{var S;(S=x==null?void 0:x.forEach)==null||S.call(x,I=>{h.has(I.id)||(h.add(I.id),u.value.push(I))})})}}catch(A){((H=A==null?void 0:A.response)==null?void 0:H.status)===404?f.value=l("debouncedFilter.errors.invalid"):(u.value=[],d.value=l("debouncedFilter.errors.fetch"))}finally{s.value=!1}else s.value=!0,f.value="",u.value=(w=m.value)==null?void 0:w.filter(A=>{var h;let p=!1;for(const x of i.searchKeys){const S=typeof A[x]=="string"?(h=A[x])==null?void 0:h.toLowerCase():A[x];S!=null&&S.includes(T.toLowerCase())&&(p=!0)}return p}),(!u.value||!u.value.length)&&(f.value=l("debouncedFilter.errors.invalid")),s.value=!1}};return{loading:s,error:d,validationError:f,results:u,allRecords:m,loadItems:C,debouncedQueryChange:c}}function An(e,n){const r=t.unref(n),i=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function Bn(){const{i18n:{t:e}}=he();return{getErrorFieldsFromError:i=>{var a,c,s;if(!i)return{messages:[e("errors.unexpected")],fields:[]};if(((a=i==null?void 0:i.response)==null?void 0:a.status)===401)return{messages:[],fields:[]};let o=[e("errors.unexpected")];const l=[];if((c=i==null?void 0:i.response)!=null&&c.data){if((s=i.response.data.details)!=null&&s.length)return o=[],i.response.data.details.forEach(d=>{let f=e("errors.unexpected");d.messages&&Array.isArray(d.messages)&&d.messages.length&&(f=d.messages.join(", ")),d.field&&l.push({field:d.field,message:f}),o.push(`${d.field??""} ${f}`)}),{messages:o,fields:l};if(i.response.data.message&&Array.isArray(i.response.data.message))return o=[],i.response.data.message.forEach(d=>{if(d!=null&&d.constraints){const f=Object.values(d.constraints).join(", ");o.push(f),d.property&&l.push({field:d.property,message:f})}else d!=null&&d.property&&(d!=null&&d.message)?(l.push({field:d.property,message:d.message}),o.push(d.message)):o.push(d)}),{messages:o,fields:l};if(typeof i.response.data.message=="string"||typeof i.response.data=="string")return{messages:[i.response.data.message],fields:[]};if(typeof i.response.data=="object")return o=[],Object.keys(i.response.data).forEach(d=>{l.push({field:d,message:i.response.data[d]}),o.push(i.response.data[d])}),{messages:o,fields:l}}return{messages:[i.message||e("errors.unexpected")],fields:[]}},getMessageFromError:i=>{var o,l,a,c;if(!i)return e("errors.unexpected");if(((o=i==null?void 0:i.response)==null?void 0:o.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((l=i==null?void 0:i.response)!=null&&l.data){if(i.response.data.detail)return i.response.data.detail;if((a=i.response.data.details)!=null&&a.length)return i.response.data.details.map(s=>{let d=e("errors.unexpected");return s.messages&&typeof s.messages=="object"&&s.messages.length&&(d=s.messages.join(", ")),s.field?`${s.field} - ${d}`:d}).join("; ");if(i.response.data.message){const{message:s}=i.response.data;return Array.isArray(s)?(c=s[0])!=null&&c.constraints?Object.values(s[0].constraints)[0]:s[0]:s}if(typeof i.response.data=="string")return i.response.data;if(typeof i.response.data=="object")return Object.keys(i.response.data).map(s=>`${s} ${i.response.data[s]}`).join(", ")}return i.message||e("errors.unexpected")}}}function _n(e){const n=window.location.origin,r=n.endsWith("/")?n:`${n}/`;try{const i=e.join("/"),o=`${r}${i}`,l=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!l&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function Qe(e,n){const r=t.computed(()=>{const o=t.toValue(e);return o.app==="konnect"||!!o.isExactMatch}),i=t.computed(()=>{const o=t.toValue(n);return o.startsWith("/")?new URL(`${window.location.origin}${o}`):new URL(o)});return o=>{const{page:l,pageSize:a,offset:c,sortColumnKey:s,sortColumnOrder:d,query:f}=o;try{let u=new URL(i.value.href);return r.value&&f?(u.search="",u=t.toValue(e).isExactMatch?new URL(`${u.href}/${f}`):new URL(`${u.href}?filter[name][contains]=${f}`)):(r.value||new URLSearchParams(f).forEach((g,m)=>{u.searchParams.append(m,g)}),s&&u.searchParams.append("sort_by",s),d==="desc"&&u.searchParams.append("sort_desc","1"),u.searchParams.append("size",String(a))),c&&l!==1&&u.searchParams.append("offset",String(c)),u.href}catch(u){return console.error("RouteList(fetcher)",u),t.toValue(n)}}}const Ze=new Map;function En(e,n,r){const i=t.ref(!0),o=t.toValue(e),{axiosInstance:l}=Be(o.axiosRequestConfig),a=Qe(e,n),c=t.ref({status:G.Idle}),s=async u=>{var m;const g=t.toValue(r)||"data";try{c.value=i.value?{status:G.InitialLoad}:{status:G.Loading},i.value=!1;let y=a(u);y.includes("filter[name]")&&(y=`${y}&page[size]=${u.pageSize}&page[number]=${u.page}`);const b=await l.get(y);if(b.status>=400)throw b;const C=b.data,B=g&&g.replace(/[^\w-_]/gi,"");let k;C[B]?k=Array.isArray(C[B])?C[B]:[C[B]]:Array.isArray(C)?k=C:k=Object.keys(C).length?[C]:[];const T={data:k,total:k.length,...C.offset?{pagination:{offset:C.offset}}:null};return T.data.length===0&&!u.query?c.value={status:G.NoRecords,response:T}:c.value={status:G.Idle,response:T},T}catch(y){const b={data:[],total:0};return u.query&&(((m=y.response)==null?void 0:m.status)===404||y.status===404)?(c.value={status:G.NoResults,response:b,error:y.response?y:{response:y}},b):(c.value={status:G.Error,response:b,error:y.response?y:{response:y}},b)}},d=o.cacheIdentifier,f=Xe(d);return{fetcher:s,fetcherState:c,fetcherCacheKey:f}}function Xe(e){if(e){let n=Ze.get(e);return n||(n=t.ref(1),Ze.set(e,n)),n}return t.ref(1)}function Tn(){const e=(i,o="_")=>i?i.split(o).map(l=>l.toLowerCase()==="id"?l.toUpperCase():l.charAt(0).toUpperCase()+l.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:i=>i?i.replace(n,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const et=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,tt=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(et);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},nt=e=>e==="*"||e==="x"||e==="X",rt=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},$n=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],Nn=(e,n)=>{if(nt(e)||nt(n))return 0;const[r,i]=$n(rt(e),rt(n));return r>i?1:r<i?-1:0},it=(e,n)=>{for(let r=0;r<Math.max(e.length,n.length);r++){const i=Nn(e[r]||"0",n[r]||"0");if(i!==0)return i}return 0},Fn=(e,n)=>{const r=tt(e),i=tt(n),o=r.pop(),l=i.pop(),a=it(r,i);return a!==0?a:o&&l?it(o.split("."),l.split(".")):o||l?o?-1:1:0},ot=(e,n,r)=>{In(r);const i=Fn(e,n);return at[r].includes(i)},at={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},lt=Object.keys(at),In=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(lt.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${lt.join("|")}`)},On=e=>typeof e=="string"&&/^[v\d]/.test(e)&&et.test(e);function Ln(e){const{gatewayInfo:n,supportedRange:r}=e;if(!n)return!0;const{edition:i,version:o}=n;if(!On(o))return console.error("Invalid version"),!1;const l=r[i];if(!l)return!1;const[a,c]=l;return!(a&&ot(o,a,"<")||c&&ot(o,c,">"))}function Vn(e){const n=t.ref(0),r=t.ref(0),i=t.ref(!1);return t.watch(e,l=>{l&&!i.value&&(n.value=l.offsetWidth,r.value=l.scrollWidth,i.value=!0)}),{isTruncated:t.computed(()=>n.value<r.value)}}function Dn(){const{i18n:{t:e}}=he();return{utf8Name:r=>/^[\p{N}\p{L}.\-_~]*$/u.test(r)?"":e("validationErrors.utf8Name")}}const _e=Symbol("schema"),Rn=e=>{t.provide(_e,e)},Kn=e=>{var o,l;const n=t.inject(_e,void 0),r=(l=(o=n==null?void 0:n.value)==null?void 0:o.fields)==null?void 0:l.find(a=>Object.keys(a)[0]===e),i=t.toRef(r==null?void 0:r[e]);return t.provide(_e,i),i};function Mn(e){let n="";const r=t.ref(!1),i=t.ref(null),o=t.computed(()=>{let a;return r.value?a=!0:i.value?a=i.value.hasData||e&&t.toValue(e):a=!1,!a});return{tableState:i,hasRecords:r,hideTableToolbar:o,handleStateChange:a=>{a.hasData?r.value=!0:a.state==="success"&&!a.hasData&&(!e||!n)&&(r.value=!1),e&&(n=t.toValue(e)),i.value={...a}}}}const L={useAxios:Be,useDebouncedFilter:wn,useDeleteUrlBuilder:An,useErrors:Bn,useExternalLinkCreator:_n,useFetcher:En,useFetcherCacheKey:Xe,useFetchUrlBuilder:Qe,useHelpers:Ge,useStringHelpers:Tn,useI18n:he,useGatewayFeatureSupported:Ln,useTruncationDetector:Vn,useValidators:Dn,useSchemaProvider:Rn,useSubSchema:Kn,useTableState:Mn},jn={key:0,class:"config-card-fieldset-title"},vn=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:r}}=L.useI18n(),{convertKeyToTitle:i}=L.useStringHelpers(),o=t.computed(()=>n.item.key??"json-array-item"),l=t.computed(()=>n.item.value??n.item),a=t.computed(()=>{const s=JSON.parse(JSON.stringify(l.value));return n.isArrayItem&&delete s.name,s}),c=t.computed(()=>{var s;return n.isArrayItem?(s=l.value)!=null&&s.name?i(l.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:n.index}):""});return(s,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",jn,[t.createElementVNode("b",null,t.toDisplayString(c.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(a.value),(f,u)=>(t.openBlock(),t.createBlock(Ee,{key:`${o.value}-property-${u}`,item:{key:f,label:t.unref(i)(f),value:a.value[f]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),W=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},ct=W(vn,[["__scopeId","data-v-dc1e39a1"]]),st=W(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=L.useI18n();return(r,i)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=l=>r.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-2feb8c2e"]]),Pn=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=L.useI18n();return(r,i)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Un="#0044f4",qn="#e0e4ea",Hn="#afb7c5",Yn="#0044f4",Wn="1px",zn="16px",Jn="20px",Gn={class:"config-card-details-row"},Qn=["data-testid"],Zn=["data-testid"],Xn=["data-testid"],er=["data-testid"],tr={key:1},nr=["data-testid"],rr=["data-testid"],ir=["data-testid"],or=["data-testid"],ar={name:"ConfigCardItem",components:{JsonCardItem:ct,StatusBadge:Pn,InternalLinkItem:st}},lr=t.defineComponent({...ar,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:n}){t.useCssVars(F=>({"70f369b3":g.value?"none":`solid ${t.unref(Wn)} ${t.unref(qn)}`,"67c2fae6":u.value&&d.value?"block":"flex","847b138c":u.value&&d.value?"100%":r.slim?"50%":"25%","847687d6":u.value&&d.value?"100%":r.slim?"50%":"75%"}));const r=e,i=n,o=t.useId(),l=t.useSlots(),{i18n:{t:a,formatIsoDate:c,formatUnixTimeStamp:s}}=L.useI18n(),d=t.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),f=t.computed(()=>!!(r.item.tooltip||l["label-tooltip"])),u=t.computed(()=>r.item.type===O.Json||r.item.type===O.JsonArray),g=t.computed(()=>r.item.type===O.JsonArray),m=L.useSubSchema(r.item.key),y=t.computed(()=>{var F;return r.item.type?r.item.type:(F=m==null?void 0:m.value)!=null&&F.encrypted?O.Redacted:void 0}),b=t.computed(()=>{switch(y.value){case O.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case O.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case O.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case O.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":a("baseConfigCard.copy.tooltip",{label:r.item.label})}};case O.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:isNaN(Number(r.item.value))?c(r.item.value):s(r.item.value)};case O.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case O.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case O.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:r.item.value}};case O.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case O.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:F=>{i("navigation-click",F)}}};case O.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case O.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case O.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return r.item.value!=null&&typeof r.item.value=="object"?{tag:"KCodeBlock",attrs:{"data-testid":`${r.item.key}-json-code`,id:`json-code-${o}`,language:"json",code:JSON.stringify(r.item.value,null," "),maxHeight:"480px",showLineNumbers:!1}}:{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),C=t.ref(),B=t.ref(),{isTruncated:k}=L.useTruncationDetector(C),{isTruncated:T}=L.useTruncationDetector(B);return(F,H)=>{const w=t.resolveComponent("KTooltip"),A=t.resolveComponent("KLabel"),p=t.resolveComponent("KBadge"),h=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",Gn,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(F.$slots,"label",{item:e.item},()=>[t.createVNode(A,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createVNode(w,{text:t.unref(k)?e.item.label:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"labelContent",ref:C,class:"label-content"},t.toDisplayString(e.item.label),513)]),_:1},8,["text"])]),_:2},[f.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(F.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,Zn)]),key:"0"}:void 0]),1024)],!0)],8,Qn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(F.$slots,e.item.key,{rowValue:e.item.value},()=>[d.value?(t.openBlock(),t.createElementBlock("div",tr,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(b.value.tag),t.normalizeProps(t.guardReactiveProps(b.value.attrs)),{default:t.withCtx(()=>[b.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,(x,S)=>(t.openBlock(),t.createBlock(p,{key:`${e.item.key}-badge-tag-${S}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${S}`,tooltip:x,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,nr)):b.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,(x,S)=>(t.openBlock(),t.createBlock(h,t.mergeProps({ref_for:!0},b.value.childAttrs,{key:`${e.item.key}-copy-uuid-${S}`,"data-testid":`${e.item.key}-copy-uuid-${S}`,text:x}),null,16,["data-testid","text"]))),128))],8,rr)):b.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,(x,S)=>(t.openBlock(),t.createBlock(p,{key:`${e.item.key}-badge-method-${S}`,appearance:Object.values(t.unref(le.BadgeMethodAppearances)).includes(x.toLowerCase())?x.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${S}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,ir)):b.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(x,S)=>(t.openBlock(),t.createBlock(ct,{key:`json-array-item-${S}`,index:S,"is-array-item":"",item:x},null,8,["index","item"]))),128))],8,or)):(t.openBlock(),t.createBlock(w,{key:4,text:t.unref(T)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:B,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(b.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,er))],!0)],8,Xn)])}}}),Ee=W(lr,[["__scopeId","data-v-66d61bea"]]),cr={class:"json-config config-card-code-block"},sr={key:0,class:"json-endpoint"},Te=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(o=>({eca0976a:`${i.value}ch`}));const n=e,r=t.computed(()=>n.entityRecord),i=t.computed(()=>{var a;if(!n.fetcherUrl)return 0;const o=(a=n.fetcherUrl)==null?void 0:a.split("/");return o.length<2?0:41+(n.requestMethod==="post"?o[o.length-1]:o[o.length-2]).length});return(o,l)=>{const a=t.resolveComponent("KBadge"),c=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",cr,[n.fetcherUrl?(t.openBlock(),t.createElementBlock("div",sr,[t.createVNode(a,{appearance:n.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(c,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),n.entityRecord?(t.openBlock(),t.createBlock(c,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.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 dt(e){return typeof e>"u"||e===null}function dr(e){return typeof e=="object"&&e!==null}function ur(e){return Array.isArray(e)?e:dt(e)?[]:[e]}function fr(e,n){var r,i,o,l;if(n)for(l=Object.keys(n),r=0,i=l.length;r<i;r+=1)o=l[r],e[o]=n[o];return e}function pr(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function mr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var hr=dt,gr=dr,yr=ur,br=pr,Cr=mr,kr=fr,R={isNothing:hr,isObject:gr,toArray:yr,repeat:br,isNegativeZero:Cr,extend:kr};function ut(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
|
|
2
2
|
|
|
3
3
|
`+e.mark.snippet),i+" "+r):i}function se(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=ut(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}se.prototype=Object.create(Error.prototype),se.prototype.constructor=se,se.prototype.toString=function(n){return this.name+": "+ut(this,n)};var U=se;function $e(e,n,r,i,o){var l="",a="",c=Math.floor(o/2)-1;return i-n>c&&(l=" ... ",n=i-c+l.length),r-i>c&&(a=" ...",r=i+c-a.length),{str:l+e.slice(n,r).replace(/\t/g,"→")+a,pos:i-n+l.length}}function Ne(e,n){return R.repeat(" ",n-e.length)+e}function xr(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],l,a=-1;l=r.exec(e.buffer);)o.push(l.index),i.push(l.index+l[0].length),e.position<=l.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var c="",s,d,f=Math.min(e.line+n.linesAfter,o.length).toString().length,u=n.maxLength-(n.indent+f+3);for(s=1;s<=n.linesBefore&&!(a-s<0);s++)d=$e(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),u),c=R.repeat(" ",n.indent)+Ne((e.line-s+1).toString(),f)+" | "+d.str+`
|
|
4
4
|
`+c;for(d=$e(e.buffer,i[a],o[a],e.position,u),c+=R.repeat(" ",n.indent)+Ne((e.line+1).toString(),f)+" | "+d.str+`
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
`,d+=`${q}${q}id = konnect_gateway_${f}.my_${f}.id
|
|
49
49
|
`,d+=`${q}}
|
|
50
50
|
`),d+=`}
|
|
51
|
-
`,d});return(c,s)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",Io,[n.entityRecord?(t.openBlock(),t.createBlock(d,{key:0,id:"terraform-codeblock",code:a.value,language:"terraform",theme:"dark"},null,8,["code"])):t.createCommentVNode("",!0)])}}}),Oo={key:0,class:"config-card-display-form"},Lo=["data-testid"],Vo={key:0,class:"config-card-prop-section-title"},pn=W(t.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ce.includes(e)},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json","terraform"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},codeBlockRecordFormatter:{type:Function,required:!1,default:e=>e}},setup(e){const n=e,r=t.useSlots(),{i18n:{t:i}}=L.useI18n(),o=a=>!!(a.tooltip||r[`${a.key}-label-tooltip`]),l=t.computed(()=>{if(!n.record)return n.record;let a=n.record;n.codeBlockRecordFormatter&&(a=n.codeBlockRecordFormatter(a,n.format));const c=JSON.parse(JSON.stringify(a));return delete c.created_at,delete c.updated_at,c});return(a,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Oo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,s=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${s}-props`,class:t.normalizeClass(`config-card-details-${s}-props`),"data-testid":`config-card-details-${s}-props`},[s!=="basic"?(t.openBlock(),t.createElementBlock("div",Vo,t.toDisplayString(s==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[s],d=>(t.openBlock(),t.createBlock(Ee,{key:d.key,item:d},t.createSlots({label:t.withCtx(()=>[t.renderSlot(a.$slots,`${d.key}-label`,{row:d},void 0,!0)]),[d.key]:t.withCtx(({rowValue:f})=>[t.renderSlot(a.$slots,d.key,{row:d,rowValue:f},void 0,!0)]),_:2},[o(d)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(a.$slots,`${d.key}-label-tooltip`,{row:d},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Lo))),128))])):t.createCommentVNode("",!0),e.format==="json"&&l.value?(t.openBlock(),t.createBlock(Te,{key:1,config:n.config,"entity-record":l.value,"fetcher-url":n.fetcherUrl,"request-method":"get"},null,8,["config","entity-record","fetcher-url"])):t.createCommentVNode("",!0),e.format==="yaml"&&l.value?(t.openBlock(),t.createBlock(Ue,{key:2,"entity-record":l.value},null,8,["entity-record"])):t.createCommentVNode("",!0),e.format==="terraform"&&l.value?(t.openBlock(),t.createBlock(qe,{key:3,"entity-record":l.value,"entity-type":n.entityType},null,8,["entity-record","entity-type"])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d67757a9"]]),Do={class:"config-card-title","data-testid":"config-card-title"},Ro={class:"config-card-actions"},Ko=["href"],Mo={class:"config-card-details-section"},jo=W(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ce.includes(e)},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},recordResolver:{type:Function,required:!1,default:e=>e},codeBlockRecordFormatter:{type:Function,required:!1,default:e=>e},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"}},emits:["loading","fetch:success","fetch:error"],setup(e,{emit:n}){var A;const r=n,i=e,{i18n:{t:o}}=L.useI18n(),{getMessageFromError:l}=L.useErrors(),{convertKeyToTitle:a}=L.useStringHelpers();L.useSubSchema(i.pluginConfigKey);const{axiosInstance:c}=L.useAxios((A=i.config)==null?void 0:A.axiosRequestConfig),s=[{label:o("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:o("baseForm.configuration.json"),value:"json"},{label:o("baseForm.configuration.yaml"),value:"yaml"}];i.config.app==="konnect"&&s.splice(2,0,{label:o("baseForm.configuration.terraform"),value:"terraform"});const d=s[0].value,f=t.ref(d),u=p=>{f.value=p==null?void 0:p.value},g=(p,h)=>{localStorage.setItem(p,h)};t.watch(f,p=>{i.config.formatPreferenceKey&&g(i.config.formatPreferenceKey,p)}),t.onMounted(()=>{if(i.config.formatPreferenceKey){const p=localStorage.getItem(i.config.formatPreferenceKey);p&&s.some(h=>h.value===p)?f.value=p:f.value=d,g(i.config.formatPreferenceKey,f.value)}});const m={id:{type:O.ID,label:o("baseConfigCard.commonFields.id_label"),order:0,section:Y.Basic},name:{order:1,section:Y.Basic},enabled:{type:O.BadgeStatus,order:2,section:Y.Basic},updated_at:{type:O.Date,label:o("baseConfigCard.commonFields.updated_at_label"),order:3,section:Y.Basic},created_at:{type:O.Date,label:o("baseConfigCard.commonFields.created_at_label"),order:4,section:Y.Basic},tags:{type:O.BadgeTag,order:-1,section:Y.Basic},partials:{type:O.LinkInternal,label:o("baseConfigCard.commonFields.partial_label"),order:-1,section:Y.Basic}},y=t.ref(!1),b=t.ref(!1),C=t.ref(""),B=t.ref({}),k=t.computed(()=>{var x,S,I;if(!B.value)return[];const p=[],h=Object.keys(B.value).length;for(const N in B.value){const $=(S=(x=i.configSchema)==null?void 0:x[N])==null?void 0:S.order,j=(I=m[N])==null?void 0:I.order;let V=h;(j||j===0)&&(V=j===-1?h+1:j),$&&(V=$===-1?h+1:$),p.push([N,V])}return p.sort(function(N,$){return N[1]-$[1]}),p.map(N=>{var Se,gn;const $=N[0],j=(Se=B.value)==null?void 0:Se[$],V=((gn=i.configSchema)==null?void 0:gn[$])||{},v=m[$];return{key:$,value:j,hidden:V.hidden||!1,type:V.type??((v==null?void 0:v.type)||O.Text),label:V.label??((v==null?void 0:v.label)||a($)),tooltip:V.tooltip??((v==null?void 0:v.tooltip)||void 0),section:V.section??((v==null?void 0:v.section)||Y.Advanced)}}).filter(N=>!N.hidden&&N.key!==i.pluginConfigKey)}),T=t.computed(()=>{var S,I;if(!B.value||!i.pluginConfigKey)return[];const p=B.value[i.pluginConfigKey]||{},h=Object.keys(p).length,x=[];for(const N in p){const $=(I=(S=i.pluginConfigSchema)==null?void 0:S[N])==null?void 0:I.order,j=p[N];let V=j!=null&&j!==""?h-1:h;$&&(V=$===-1?h+1:$),x.push([N,V])}return x.sort(function(N,$){return N[1]-$[1]}),x.map(N=>{var v;const $=N[0],j=p[$],V=((v=i.pluginConfigSchema)==null?void 0:v[$])||{};return{key:$,value:j,hidden:V.hidden||!1,type:V.type??O.Text,label:V.label??a($),tooltip:V.tooltip??void 0,section:Y.Plugin}}).filter(N=>!N.hidden)}),F=t.computed(()=>{var p,h,x,S;return{basic:(p=k.value)==null?void 0:p.filter(I=>I.section===Y.Basic),advanced:(h=k.value)==null?void 0:h.filter(I=>I.section===Y.Advanced),plugin:(S=T.value)==null?void 0:S.concat((x=k.value)==null?void 0:x.filter(I=>I.section===Y.Plugin))}}),H=t.computed(()=>{const p=[];return F.value.basic.length&&p.push("basic"),F.value.advanced.length&&p.push("advanced"),F.value.plugin.length&&p.push("plugin"),p}),w=t.computed(()=>{var h,x;let p=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((h=i.config)==null?void 0:h.controlPlaneId)||""):i.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,(x=i.config)!=null&&x.workspace?`/${i.config.workspace}`:"")),p=p.replace(/{id}/gi,i.config.entityId),p});return t.watch(y,p=>{r("loading",p)},{immediate:!0}),t.onBeforeMount(async()=>{b.value=!1,y.value=!0;try{const{data:p}=await c.get(w.value);if(i.dataKey)if(typeof p[i.dataKey]<"u")B.value={...p[i.dataKey]};else throw new Error(o("errors.dataKeyUndefined",{dataKey:i.dataKey}));else i.recordResolver?B.value={...i.recordResolver(p)}:B.value={...p};Object.keys(i.configSchema).filter(x=>i.configSchema[x].forceShow).forEach(x=>{B.value&&typeof B.value[x]>"u"&&(B.value[x]=null)}),r("fetch:success",p)}catch(p){const h=l(p);C.value=h.startsWith("code")?o("baseConfigCard.errors.load"):h,b.value=!0,r("fetch:error",p)}finally{y.value=!1}}),(p,h)=>{const x=t.resolveComponent("KLabel"),S=t.resolveComponent("KSelect"),I=t.resolveComponent("KButton"),N=t.resolveComponent("KSkeleton"),$=t.resolveComponent("KEmptyState"),j=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(j,{class:"kong-ui-entity-base-config-card","title-tag":e.titleTag},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",Ro,[t.renderSlot(p.$slots,"actions",{},void 0,!0),t.createVNode(x,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1}),t.createVNode(S,{modelValue:f.value,"onUpdate:modelValue":h[0]||(h[0]=V=>f.value=V),"data-testid":"select-config-format",items:s,onChange:u},null,8,["modelValue"]),e.configCardDoc?(t.openBlock(),t.createBlock(I,{key:0,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(ee.BookIcon),{size:t.unref(Jn)},null,8,["size"])],8,Ko)]),_:1})):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(N,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):b.value?(t.openBlock(),t.createBlock($,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(C.value),1)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",Mo,[t.createVNode(pn,{"code-block-record-formatter":e.codeBlockRecordFormatter,config:e.config,"entity-type":e.entityType,"fetcher-url":w.value,format:f.value,"prop-list-types":H.value,"property-collections":F.value,record:B.value},t.createSlots({_:2},[t.renderList(Object.keys(p.$slots),V=>({name:V,fn:t.withCtx(({row:v,rowValue:Se})=>[t.renderSlot(p.$slots,V,{row:v,rowValue:Se},void 0,!0)])}))]),1032,["code-block-record-formatter","config","entity-type","fetcher-url","format","prop-list-types","property-collections","record"])])]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("span",Do,[t.renderSlot(p.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),[["__scopeId","data-v-9b9ea6f9"]]),vo=["novalidate"],Po=W(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},entityType:{type:String,required:!0,validator:e=>ce.includes(e)},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1},wrapperComponent:{type:String,default:"KCard"},actionTeleportTarget:{type:String,default:void 0},hideActions:{type:Boolean,default:!1},slidoutTopOffset:{type:Number,default:60},alignActionButtonToLeft:{type:Boolean,default:!1},saveButtonText:{type:String,default:void 0},cancelButtonText:{type:String,default:void 0}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{expose:n,emit:r}){var H;const i=r,o=e,l=yn.useRouter(),{i18n:{t:a}}=L.useI18n(),{getMessageFromError:c}=L.useErrors(),{axiosInstance:s}=L.useAxios((H=o.config)==null?void 0:H.axiosRequestConfig),d=t.ref(!1),f=t.computed(()=>!!o.editId),u=t.ref(!1),g=t.ref(""),m=t.computed(()=>o.canSubmit===!1||o.isReadonly),y=t.ref(!1),b=t.computed(()=>{var A,p;let w=`${o.config.apiBaseUrl}${o.fetchUrl}`;return o.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((A=o.config)==null?void 0:A.controlPlaneId)||""):o.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(p=o.config)!=null&&p.workspace?`/${o.config.workspace}`:"")),o.editId?(w=w.replace(/{id}/gi,o.editId),w):(w=w.replace(/\/{id}/gi,""),w)}),C=()=>{y.value=!y.value},B=()=>{o.config.cancelRoute?l.push(o.config.cancelRoute):k()},k=()=>{i("cancel")},T=()=>{m.value||i("submit")},F=t.ref([{title:a("baseForm.configuration.json"),hash:"#json"},{title:a("baseForm.configuration.yaml"),hash:"#yaml"}]);return o.config.app==="konnect"&&o.entityType!==me.Other&&F.value.splice(1,0,{title:a("baseForm.configuration.terraform"),hash:"#terraform"}),t.watch(()=>d.value,w=>{i("loading",w)},{immediate:!0}),t.onBeforeMount(async()=>{if(o.editId)try{u.value=!1,d.value=!0;const{data:w}=await s.get(b.value);i("fetch:success",w)}catch(w){const A=c(w);g.value=A.startsWith("code")?a("baseForm.errors.edit"):A,u.value=!0,i("fetch:error",w)}finally{d.value=!1}}),n({viewConfig:C,formCancel:k,formSubmit:T}),(w,A)=>{const p=t.resolveComponent("KSkeleton"),h=t.resolveComponent("KEmptyState"),x=t.resolveComponent("KAlert"),S=t.resolveComponent("KButton"),I=t.resolveComponent("KTabs"),N=t.resolveComponent("KSlideout");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.wrapperComponent),{class:"kong-ui-entity-base-form"},{default:t.withCtx(()=>[d.value?(t.openBlock(),t.createBlock(p,{key:0,type:"form"})):u.value?(t.openBlock(),t.createBlock(h,{key:1,"action-button-text":t.unref(a)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:B},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(g.value),1)]),_:1},8,["action-button-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:o.noValidate,onReset:t.withModifiers(k,["prevent"]),onSubmit:t.withModifiers(T,["prevent"])},[t.renderSlot(w.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(x,{key:0,appearance:"danger","data-testid":"form-error",message:e.errorMessage},null,8,["message"])):t.createCommentVNode("",!0),e.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.Teleport,{key:1,disabled:!e.actionTeleportTarget,to:e.actionTeleportTarget},[t.createElementVNode("div",{class:t.normalizeClass(["form-actions",{"form-actions-reverted":e.alignActionButtonToLeft}]),"data-testid":"form-actions"},[t.renderSlot(w.$slots,"form-actions",{},()=>[t.createVNode(S,{appearance:"tertiary","data-testid":`${e.entityType}-${f.value?"edit":"create"}-form-view-configuration`,onClick:A[0]||(A[0]=$=>C())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),t.createVNode(S,{appearance:"secondary","data-testid":`${e.entityType}-${f.value?"edit":"create"}-form-cancel`,disabled:e.isReadonly,type:"reset",onClick:A[1]||(A[1]=$=>!!e.actionTeleportTarget&&k())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.cancelButtonText??t.unref(a)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),t.createVNode(S,{appearance:"primary","data-testid":`${e.entityType}-${f.value?"edit":"create"}-form-submit`,disabled:m.value,type:"submit",onClick:A[2]||(A[2]=$=>!!e.actionTeleportTarget&&T())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.saveButtonText??t.unref(a)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)],2)],8,["disabled","to"]))],40,vo)),t.createVNode(N,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":e.slidoutTopOffset,title:t.unref(a)("baseForm.configuration.title"),visible:y.value,onClose:A[3]||(A[3]=$=>C())},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(a)("baseForm.configuration.message")),1),t.createVNode(I,{"data-testid":"form-view-configuration-slideout-tabs",tabs:F.value},{json:t.withCtx(()=>[t.createVNode(Te,{config:e.config,"entity-record":o.formFields,"fetcher-url":b.value,"request-method":o.editId?"put":"post"},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(Ue,{"entity-record":o.formFields},null,8,["entity-record"])]),terraform:t.withCtx(()=>[t.createVNode(qe,{"entity-record":o.formFields,"entity-type":e.entityType},null,8,["entity-record","entity-type"])]),_:1},8,["tabs"])]),_:1},8,["offset-top","title","visible"])]),_:3})}}}),[["__scopeId","data-v-4f672e9f"]]),Uo=["data-truncate"],qo=W(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(e){const n=e,r=t.computed(()=>{var C;return((C=n.rowEl)==null?void 0:C.querySelector(`[data-testid="${n.keyName}"]`))||null}),i=t.computed(()=>{var C;return((C=r.value)==null?void 0:C.querySelector('[data-truncate="true"]'))||null}),o=t.computed(()=>{var B,k;const C=(B=n.rowEl)==null?void 0:B.querySelectorAll("td");return C?((k=C[0])==null?void 0:k.getAttribute("data-testid"))===n.keyName:!0}),l=t.computed(()=>o.value||n.tooltip);let a;const c=()=>{a&&(a.disconnect(),a=void 0)},s=()=>{var B,k,T;let C=((B=r.value)==null?void 0:B.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const F=window.getComputedStyle(r.value);C-=(parseFloat(F.paddingLeft)||0)+(parseFloat(F.paddingRight)||0)}f.value=((k=i.value)==null?void 0:k.getBoundingClientRect().width)||0,u.value=C,g.value=((T=d.value)==null?void 0:T.innerText)||""},d=t.ref({}),f=t.ref(0),u=t.ref(0),g=t.ref(""),m=t.computed(()=>[i.value,r.value]),y=t.watch(m,C=>{if(l.value&&(c(),"ResizeObserver"in window&&window)){a=new ResizeObserver(B=>{window.requestAnimationFrame(()=>{!Array.isArray(B)||!B.length||s()})});for(const B of C)B&&a.observe(B)}},{immediate:!0,flush:"post",deep:!0}),b=t.computed(()=>l.value?f.value>u.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{y()}),(C,B)=>{const k=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:d,class:"content-wrapper"},[l.value?(t.openBlock(),t.createElementBlock("span",{key:0,"data-truncate":l.value||void 0},[t.createVNode(k,{"max-width":"300",placement:"bottom-start",text:b.value?g.value:""},{default:t.withCtx(()=>[t.renderSlot(C.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Uo)):t.renderSlot(C.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-a3a65cac"]]),Ho={class:"toolbar-container"},Yo={key:0,class:"toolbar-button-container"},Wo={key:0,class:"hidden"},zo=W(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},rowKey:{type:[String,Function],default:"id"},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:null},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},paginationAttributes:{type:Object,default:()=>({})},hidePaginationWhenOptional:{type:Boolean,default:!0},disableSorting:{type:Boolean,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:""},defaultTablePreferences:{type:Object,default:null,required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1},hidePagination:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:void 0},disablePaginationPageJump:{type:Boolean,default:void 0,validator:e=>(e&&console.warn("EntityBaseTable: `disablePaginationPageJump` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),typeof e=="boolean")},paginationType:{type:String,default:void 0,validator:e=>(e&&console.warn("EntityBaseTable: `paginationType` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),["default","offset"].includes(e))}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked","state"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=L.useI18n(),l=t.computed(()=>{var h,x;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(h=r.errorMessage)==null?void 0:h.title,message:(x=r.errorMessage)==null?void 0:x.message}}),a=t.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),c=t.computed(()=>{const h=[];return Object.keys(r.tableHeaders).forEach(S=>{const I=r.tableHeaders[S];h.push({label:I.label??S,key:S,sortable:I.sortable??!1,hidable:I.hidable??!0})}),r.enableEntityActions&&h.push({key:"actions",hideLabel:!0}),h}),s=h=>({"data-rowid":h.id,"data-testid":h.name,...r.rowAttributes(h)}),d=t.ref({}),f=h=>{var x;return(x=d.value)==null?void 0:x.$el.querySelector(`[data-rowid="${h.id}"]`)},u=h=>{const x={"data-testid":h.headerKey,...r.cellAttributes(h)};return h.colIndex===0&&(x.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),x},g=h=>{k(h),i("state",h)},m=()=>{i("empty-state-cta-clicked"),y()},y=()=>{i("clear-search-input")},b=t.computed(()=>r.disableRowClick?void 0:(h,x)=>{i("click:row",x)}),C=h=>{i("sort",h)},{hideTableToolbar:B,handleStateChange:k}=L.useTableState(()=>r.query),{setTablePreferences:T,getTablePreferences:F}=xn(),H=t.ref(F(a.value,r.defaultTablePreferences)),w=t.computed(()=>{const h=F(a.value);return{...r.initialFetcherParams,...h}}),A=h=>{H.value=h,c.value.forEach(x=>{!("hidable"in x)||!H.value.columnVisibility||x.hidable===!1&&(H.value.columnVisibility[x.key]=!0)}),a.value&&T(a.value,h)},p=t.computed(()=>({disablePageJump:r.disablePaginationPageJump,offset:r.paginationType==="offset",...r.paginationAttributes}));return(h,x)=>{const S=t.resolveComponent("KTableData"),I=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(I,{class:"kong-ui-entity-base-table",title:e.title,"title-tag":e.titleTag},{default:t.withCtx(()=>[t.createVNode(S,{ref_key:"tableRefs",ref:d,"cache-identifier":a.value,"cell-attrs":u,"client-sort":e.enableClientSort,"empty-state-action-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?void 0:e.emptyStateOptions.ctaPath,"empty-state-icon-variant":e.query?"search":"kong","empty-state-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,error:l.value.hasError,"error-state-message":l.value.message,"error-state-title":l.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),headers:c.value,"hide-pagination":e.hidePagination,"hide-pagination-when-optional":e.hidePaginationWhenOptional,"hide-toolbar":e.hideToolbar??t.unref(B),"initial-fetcher-params":w.value,loading:e.isLoading,"pagination-attributes":p.value,"resize-columns":"","row-attrs":s,"row-key":e.rowKey,"search-input":e.query,"sort-handler-function":e.enableClientSort?e.sortHandlerFunction:void 0,sortable:!e.disableSorting,"table-preferences":H.value,onEmptyStateActionClick:m,"onRow:click":b.value,onSort:x[0]||(x[0]=N=>C(N)),onState:g,"onUpdate:tablePreferences":A},t.createSlots({toolbar:t.withCtx(()=>[t.createElementVNode("div",Ho,[t.renderSlot(h.$slots,"toolbar-filter",{},void 0,!0),h.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",Yo,[t.renderSlot(h.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)])]),"action-items":t.withCtx(({row:N})=>[t.renderSlot(h.$slots,"actions",{row:N},void 0,!0)]),_:2},[h.$slots["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(h.$slots,"empty-state",{},void 0,!0)]),key:"0"}:void 0,t.renderList(e.tableHeaders,(N,$)=>({name:$,fn:t.withCtx(({row:j,rowValue:V})=>[t.createVNode(qo,{"key-name":String($),"row-el":f(j),tooltip:N.tooltip},{default:t.withCtx(()=>[t.renderSlot(h.$slots,$,{row:j,rowKey:e.rowKey,rowValue:V},()=>[t.createTextVNode(t.toDisplayString(V),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),e.query?void 0:{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.createVNode(t.unref(ee.AddIcon))]),key:"1"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-pagination-when-optional","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click"]),h.$slots["outside-actions"]&&t.unref(B)?(t.openBlock(),t.createElementBlock("div",Wo,[t.renderSlot(h.$slots,"outside-actions",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3},8,["title","title-tag"])}}}),[["__scopeId","data-v-44153100"]]),Jo={key:0,class:"kong-ui-entity-delete-error"},Go={key:1,class:"description"},Qo=W(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18nT:r}=L.useI18n(),i=e,o=n,l=t.computed(()=>i.needConfirm?i.entityName:""),a=()=>{o("cancel")},c=()=>{o("proceed")};return(s,d)=>{const f=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-appearance":"danger","action-button-disabled":e.actionPending,"action-button-text":"Yes, delete",class:"kong-ui-entity-delete-modal","confirmation-text":l.value,title:e.title,visible:e.visible,onCancel:a,onProceed:c},{default:t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",Jo,[t.createVNode(f,{appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:i.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.entityType),1)]),_:2},[i.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(i.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),i.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",Go,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(i.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-button-disabled","confirmation-text","title","visible"])}}}),[["__scopeId","data-v-4361d622"]]),Zo={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Xo={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},ea=["fill"],ta={mask:"url(#mask0_180_20349)"},na=["fill"],mn=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Un})`}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",Zo,[t.createElementVNode("mask",Xo,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,ea)]),t.createElementVNode("g",ta,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,na)])]))}}),ra={key:1,class:"kong-ui-entity-filter"},ia={class:"kong-ui-entity-filter-menu"},oa=["data-testid"],aa=["onClick","onKeydown"],la={class:"menu-item-indicator"},ca={class:"menu-item-body"},sa=["for"],da={class:"menu-item-buttons"},ua={class:"filter-clear-button-container"},fa=W(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const{i18n:{t:r}}=L.useI18n(),i=e,o=n,l=t.ref(!1),a=t.ref({}),c=t.ref(new Set),s=t.computed(()=>{const w=[];return new URLSearchParams(i.modelValue).forEach((A,p)=>{A!==""&&w.push(p)}),w}),d=t.computed(()=>{const w=i.config.fields;return Object.keys(w).filter(A=>{var p;return(p=w==null?void 0:w[A])==null?void 0:p.searchable}).map(A=>({label:w[A].label||A,value:A,expanded:!1}))});t.watch(()=>i.modelValue,w=>{a.value={},new URLSearchParams(w).forEach((A,p)=>{a.value[p]=A})});const f=()=>{l.value=!l.value},u=w=>{c.value.has(w)?c.value.delete(w):c.value.add(w)},g=w=>{o("update:modelValue",w)},m=()=>{g("")},y=w=>`filter-${w}`,b=w=>{var A,p;return(((p=(A=i.config.schema)==null?void 0:A[w])==null?void 0:p.values)??[]).map(h=>typeof h=="string"?{value:h,label:h}:h)},C=w=>{var A,p;return((p=(A=i.config.schema)==null?void 0:A[w])==null?void 0:p.type)??"text"},B=w=>{a.value={...a.value,[w]:""},T()},k=()=>{a.value={},T(!0)},T=(w=!1)=>{const A=Object.keys(a.value).reduce((p,h)=>(a.value[h]&&(p[h]=`${a.value[h]}`),p),{});w&&(l.value=!1),o("update:modelValue",new URLSearchParams(A).toString())},F=w=>{var A,p;return!!((p=(A=i.config.schema)==null?void 0:A[w])!=null&&p.filterFunction)},H=(w,A)=>{var h;const p=(h=i.config.schema)==null?void 0:h[w];return(p==null?void 0:p.filterFunction)===void 0?!0:p.filterFunction(A)};return(w,A)=>{const p=t.resolveComponent("KInput"),h=t.resolveComponent("KButton"),x=t.resolveComponent("KSelect");return e.config.isExactMatch?(t.openBlock(),t.createBlock(p,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":g},{before:t.withCtx(()=>[t.createVNode(mn)]),after:t.withCtx(()=>[t.withDirectives(t.createVNode(t.unref(ee.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:m},null,512),[[t.vShow,e.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",ra,[t.createVNode(h,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:t.withCtx(()=>[t.createVNode(mn),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(s.value.length>0?`(${s.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[t.vShow,l.value]]),t.withDirectives(t.createElementVNode("div",ia,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,S=>{var I,N;return t.openBlock(),t.createElementBlock("div",{key:S.value,class:"kong-ui-entity-filter-menu-item","data-testid":S.value},[t.createElementVNode("span",{class:t.normalizeClass(["menu-item-title",{expanded:c.value.has(S.value)}]),role:"button",tabindex:"0",onClick:$=>u(S.value),onKeydown:t.withKeys($=>u(S.value),["enter"])},[t.createTextVNode(t.toDisplayString(S.label)+" ",1),t.withDirectives(t.createElementVNode("span",la,null,512),[[t.vShow,s.value.includes(S.value)]]),t.createVNode(t.unref(ee.ChevronDownIcon),{class:t.normalizeClass(["menu-item-expand-icon",{expanded:c.value.has(S.value)}]),color:t.unref(Hn)},null,8,["class","color"])],42,aa),t.withDirectives(t.createElementVNode("div",ca,[t.createElementVNode("label",{class:"menu-item-label",for:y(S.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,sa),((N=(I=e.config.schema)==null?void 0:I[S.value])==null?void 0:N.type)==="select"?(t.openBlock(),t.createBlock(x,{key:0,id:y(S.value),modelValue:a.value[S.value],"onUpdate:modelValue":$=>a.value[S.value]=$,"enable-filtering":F(S.value),"filter-function":$=>H(S.value,$),items:b(S.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","enable-filtering","filter-function","items","placeholder"])):(t.openBlock(),t.createBlock(p,{key:1,id:y(S.value),modelValue:a.value[S.value],"onUpdate:modelValue":$=>a.value[S.value]=$,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:C(S.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[t.vShow,c.value.has(S.value)]]),t.withDirectives(t.createElementVNode("div",da,[t.createVNode(h,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:A[0]||(A[0]=$=>T(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(h,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:$=>B(S.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])],512),[[t.vShow,c.value.has(S.value)]])],8,oa)}),128)),t.createElementVNode("div",ua,[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:k},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[t.vShow,l.value]])]))}}}),[["__scopeId","data-v-084f7978"]]),pa=t.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18n:{t:r},i18nT:i}=L.useI18n(),o=e,l=n,a=t.ref(!1),c=t.computed(()=>o.action==="enable"?r("toggleModal.enable.title",{entityType:o.entityType}):r("toggleModal.disable.title",{entityType:o.entityType})),s=t.computed(()=>o.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),d=()=>l("cancel"),f=async()=>{if(o.onConfirm){a.value=!0;try{await o.onConfirm(),l("proceed")}catch(u){console.error(u)}finally{a.value=!1}}};return(u,g)=>{const m=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(m,{"action-button-disabled":a.value,"action-button-text":s.value,"data-testid":`${e.entityType}-${e.entityId}-toggle-prompt`,title:c.value,visible:e.visible,onCancel:d,onProceed:f},{default:t.withCtx(()=>[t.createVNode(t.unref(i),{keypath:`toggleModal.${o.action}.message`,scope:"global"},{entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.entityType),1)]),entityName:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),ma=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,r=t.ref(void 0),i=t.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,l)=>i.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):t.createCommentVNode("",!0)}}),M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function ha(e,n=0){return(M[e[n+0]]+M[e[n+1]]+M[e[n+2]]+M[e[n+3]]+"-"+M[e[n+4]]+M[e[n+5]]+"-"+M[e[n+6]]+M[e[n+7]]+"-"+M[e[n+8]]+M[e[n+9]]+"-"+M[e[n+10]]+M[e[n+11]]+M[e[n+12]]+M[e[n+13]]+M[e[n+14]]+M[e[n+15]]).toLowerCase()}let He;const ga=new Uint8Array(16);function ya(){if(!He){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");He=crypto.getRandomValues.bind(crypto)}return He(ga)}const hn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ba(e,n,r){var o;if(hn.randomUUID&&!e)return hn.randomUUID();e=e||{};const i=e.random??((o=e.rng)==null?void 0:o.call(e))??ya();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,ha(i)}const Ca=["aria-labelledby"],ka={class:"form-section-wrapper"},xa={key:1,class:"form-section-description"},Sa={key:2,class:"form-section-footer"},wa={class:"form-section-content"},Aa=W(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(e){const n=t.useSlots(),r=ba();return(i,o)=>(t.openBlock(),t.createElementBlock("div",{"aria-labelledby":e.title?t.unref(r):void 0,class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}]),role:"group"},[t.createElementVNode("div",ka,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.titleTag),{key:0,id:t.unref(r),class:"form-section-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1},8,["id"])):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",xa,[t.renderSlot(i.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",Sa,[t.renderSlot(i.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",wa,[t.renderSlot(i.$slots,"default",{},void 0,!0)])])],10,Ca))}}),[["__scopeId","data-v-b1f74200"]]),Ba={class:"ff-form-section"},_a={class:"header"},Ea={key:0,class:"step"},Ta={class:"header-content"},$a={class:"header-title"},Na={key:0,class:"header-description"},Fa={key:1,class:"header-extra"},Ia={class:"content"},Oa=W(t.defineComponent({__name:"EntityFormBlock",props:{step:{},title:{default:""},description:{default:""}},setup(e){const n=t.useSlots();return(r,i)=>(t.openBlock(),t.createElementBlock("div",Ba,[t.createElementVNode("header",_a,[r.step!=null?(t.openBlock(),t.createElementBlock("div",Ea,t.toDisplayString(r.step),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Ta,[t.createElementVNode("h2",$a,[t.renderSlot(r.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(r.title),1)],!0)]),r.description||n.description?(t.openBlock(),t.createElementBlock("div",Na,[t.renderSlot(r.$slots,"description",{},()=>[t.createTextVNode(t.toDisplayString(r.description),1)],!0)])):t.createCommentVNode("",!0)]),n.extra?(t.openBlock(),t.createElementBlock("div",Fa,[t.renderSlot(r.$slots,"extra",{},void 0,!0)])):t.createCommentVNode("",!0)]),t.createElementVNode("div",Ia,[t.renderSlot(r.$slots,"default",{},void 0,!0)])]))}}),[["__scopeId","data-v-cb6d2e95"]]),La={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},Va={key:0,class:"deleted-entity"},Da={key:1},Ra=["onClick"],Ka=W(t.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(e){const n=e,r=t.ref(),{isTruncated:i}=L.useTruncationDetector(r),{i18n:{t:o}}=L.useI18n(),l=o("global.actions.copyId"),a=t.ref(l),c=t.computed(()=>n.entityLinkData.deleted??!1),s=t.computed(()=>{var u;return(u=n.entityLinkData.id)!=null&&u.toString().includes(":")?n.entityLinkData.id.toString().split(":")[1]:n.entityLinkData.id}),d=t.computed(()=>{var u;return`${(u=s.value)==null?void 0:u.toString().slice(0,5)} (deleted)`}),f=async u=>{await u(s.value||"")&&(a.value=o("global.actions.copyToClipboard"),setTimeout(()=>{a.value=l},1800))};return(u,g)=>{const m=t.resolveComponent("KTooltip"),y=t.resolveComponent("KExternalLink"),b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",La,[c.value?(t.openBlock(),t.createElementBlock("div",Va,t.toDisplayString(d.value),1)):s.value?s.value?(t.openBlock(),t.createBlock(y,{key:2,class:"entity-link","hide-icon":!e.newWindow,href:e.externalLink,target:e.newWindow?"_blank":"_self"},{default:t.withCtx(()=>[t.createVNode(m,{text:t.unref(i)&&e.entityLinkData.label||""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},t.toDisplayString(e.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Da,t.toDisplayString(" – "))),s.value&&e.allowCopy?(t.openBlock(),t.createBlock(m,{key:a.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:a.value},{default:t.withCtx(()=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:C})=>[t.createElementVNode("span",{class:"entity-link-copy-id",onClick:t.withModifiers(B=>f(C),["stop"])},[t.createVNode(t.unref(ee.CopyIcon),{class:"copy-icon",color:t.unref(Yn),"data-testid":"copy-id",size:t.unref(zn)},null,8,["color","size"])],8,Ra)]),_:1})]),_:1},8,["text"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-96efdfa5"]]),Ma={class:"kong-ui-public-entity-empty-state"},ja={class:"entity-empty-state-content"},va={key:0,class:"empty-state-image"},Pa={key:1,class:"entity-empty-state-title"},Ua={key:2,class:"entity-empty-state-description"},qa={key:3,class:"entity-empty-state-pricing"},Ha={key:0,class:"entity-empty-state-message"},Ya={key:1,class:"entity-empty-state-action"},Wa={key:2,class:"entity-empty-state-card-container"},za={key:0,class:"feature-icon"},Ja={class:"card-header"},Ga=["title"],Qa={key:3,class:"entity-empty-state-bottom-container"},Za=W(t.defineComponent({__name:"EntityEmptyState",props:{appearance:{type:String,default:()=>"primary",validator:e=>we.includes(e)},title:{type:String,default:""},description:{type:String,default:""},pricing:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},actionButtonText:{type:String,default:""},learnMore:{type:Boolean,default:!1},features:{type:Array,default:()=>[]}},emits:["click:create","click:learn-more"],setup(e){const n=e,{i18n:{t:r}}=L.useI18n(),i=t.ref(!1),o=t.computed(()=>i.value&&!!n.actionButtonText),l=t.computed(()=>we.includes(n.appearance)?n.appearance:["primary",n.appearance]);return t.onBeforeMount(async()=>{i.value=await n.canCreate()}),t.onMounted(()=>t.warn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
51
|
+
`,d});return(c,s)=>{const d=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",Io,[n.entityRecord?(t.openBlock(),t.createBlock(d,{key:0,id:"terraform-codeblock",code:a.value,language:"terraform",theme:"dark"},null,8,["code"])):t.createCommentVNode("",!0)])}}}),Oo={key:0,class:"config-card-display-form"},Lo=["data-testid"],Vo={key:0,class:"config-card-prop-section-title"},pn=W(t.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ce.includes(e)},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json","terraform"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},codeBlockRecordFormatter:{type:Function,required:!1,default:e=>e}},setup(e){const n=e,r=t.useSlots(),{i18n:{t:i}}=L.useI18n(),o=a=>!!(a.tooltip||r[`${a.key}-label-tooltip`]),l=t.computed(()=>{if(!n.record)return n.record;let a=n.record;n.codeBlockRecordFormatter&&(a=n.codeBlockRecordFormatter(a,n.format));const c=JSON.parse(JSON.stringify(a));return delete c.created_at,delete c.updated_at,c});return(a,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Oo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,s=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${s}-props`,class:t.normalizeClass(`config-card-details-${s}-props`),"data-testid":`config-card-details-${s}-props`},[s!=="basic"?(t.openBlock(),t.createElementBlock("div",Vo,t.toDisplayString(s==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[s],d=>(t.openBlock(),t.createBlock(Ee,{key:d.key,item:d},t.createSlots({label:t.withCtx(()=>[t.renderSlot(a.$slots,`${d.key}-label`,{row:d},void 0,!0)]),[d.key]:t.withCtx(({rowValue:f})=>[t.renderSlot(a.$slots,d.key,{row:d,rowValue:f},void 0,!0)]),_:2},[o(d)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(a.$slots,`${d.key}-label-tooltip`,{row:d},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Lo))),128))])):t.createCommentVNode("",!0),e.format==="json"&&l.value?(t.openBlock(),t.createBlock(Te,{key:1,config:n.config,"entity-record":l.value,"fetcher-url":n.fetcherUrl,"request-method":"get"},null,8,["config","entity-record","fetcher-url"])):t.createCommentVNode("",!0),e.format==="yaml"&&l.value?(t.openBlock(),t.createBlock(Ue,{key:2,"entity-record":l.value},null,8,["entity-record"])):t.createCommentVNode("",!0),e.format==="terraform"&&l.value?(t.openBlock(),t.createBlock(qe,{key:3,"entity-record":l.value,"entity-type":n.entityType},null,8,["entity-record","entity-type"])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d67757a9"]]),Do={class:"config-card-title","data-testid":"config-card-title"},Ro={class:"config-card-actions"},Ko=["href"],Mo={class:"config-card-details-section"},jo=W(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ce.includes(e)},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},recordResolver:{type:Function,required:!1,default:e=>e},codeBlockRecordFormatter:{type:Function,required:!1,default:e=>e},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"}},emits:["loading","fetch:success","fetch:error","configFormatChange"],setup(e,{emit:n}){var A;const r=n,i=e,{i18n:{t:o}}=L.useI18n(),{getMessageFromError:l}=L.useErrors(),{convertKeyToTitle:a}=L.useStringHelpers();L.useSubSchema(i.pluginConfigKey);const{axiosInstance:c}=L.useAxios((A=i.config)==null?void 0:A.axiosRequestConfig),s=[{label:o("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:o("baseForm.configuration.json"),value:"json"},{label:o("baseForm.configuration.yaml"),value:"yaml"}];i.config.app==="konnect"&&s.splice(2,0,{label:o("baseForm.configuration.terraform"),value:"terraform"});const d=s[0].value,f=t.ref(d),u=p=>{f.value=p==null?void 0:p.value,r("configFormatChange",f.value)},g=(p,h)=>{localStorage.setItem(p,h)};t.watch(f,p=>{i.config.formatPreferenceKey&&g(i.config.formatPreferenceKey,p)}),t.onMounted(()=>{if(i.config.formatPreferenceKey){const p=localStorage.getItem(i.config.formatPreferenceKey);p&&s.some(h=>h.value===p)?f.value=p:f.value=d,g(i.config.formatPreferenceKey,f.value)}});const m={id:{type:O.ID,label:o("baseConfigCard.commonFields.id_label"),order:0,section:Y.Basic},name:{order:1,section:Y.Basic},enabled:{type:O.BadgeStatus,order:2,section:Y.Basic},updated_at:{type:O.Date,label:o("baseConfigCard.commonFields.updated_at_label"),order:3,section:Y.Basic},created_at:{type:O.Date,label:o("baseConfigCard.commonFields.created_at_label"),order:4,section:Y.Basic},tags:{type:O.BadgeTag,order:-1,section:Y.Basic},partials:{type:O.LinkInternal,label:o("baseConfigCard.commonFields.partial_label"),order:-1,section:Y.Basic}},y=t.ref(!1),b=t.ref(!1),C=t.ref(""),B=t.ref({}),k=t.computed(()=>{var x,S,I;if(!B.value)return[];const p=[],h=Object.keys(B.value).length;for(const N in B.value){const $=(S=(x=i.configSchema)==null?void 0:x[N])==null?void 0:S.order,j=(I=m[N])==null?void 0:I.order;let V=h;(j||j===0)&&(V=j===-1?h+1:j),$&&(V=$===-1?h+1:$),p.push([N,V])}return p.sort(function(N,$){return N[1]-$[1]}),p.map(N=>{var Se,gn;const $=N[0],j=(Se=B.value)==null?void 0:Se[$],V=((gn=i.configSchema)==null?void 0:gn[$])||{},v=m[$];return{key:$,value:j,hidden:V.hidden||!1,type:V.type??((v==null?void 0:v.type)||O.Text),label:V.label??((v==null?void 0:v.label)||a($)),tooltip:V.tooltip??((v==null?void 0:v.tooltip)||void 0),section:V.section??((v==null?void 0:v.section)||Y.Advanced)}}).filter(N=>!N.hidden&&N.key!==i.pluginConfigKey)}),T=t.computed(()=>{var S,I;if(!B.value||!i.pluginConfigKey)return[];const p=B.value[i.pluginConfigKey]||{},h=Object.keys(p).length,x=[];for(const N in p){const $=(I=(S=i.pluginConfigSchema)==null?void 0:S[N])==null?void 0:I.order,j=p[N];let V=j!=null&&j!==""?h-1:h;$&&(V=$===-1?h+1:$),x.push([N,V])}return x.sort(function(N,$){return N[1]-$[1]}),x.map(N=>{var v;const $=N[0],j=p[$],V=((v=i.pluginConfigSchema)==null?void 0:v[$])||{};return{key:$,value:j,hidden:V.hidden||!1,type:V.type??O.Text,label:V.label??a($),tooltip:V.tooltip??void 0,section:Y.Plugin}}).filter(N=>!N.hidden)}),F=t.computed(()=>{var p,h,x,S;return{basic:(p=k.value)==null?void 0:p.filter(I=>I.section===Y.Basic),advanced:(h=k.value)==null?void 0:h.filter(I=>I.section===Y.Advanced),plugin:(S=T.value)==null?void 0:S.concat((x=k.value)==null?void 0:x.filter(I=>I.section===Y.Plugin))}}),H=t.computed(()=>{const p=[];return F.value.basic.length&&p.push("basic"),F.value.advanced.length&&p.push("advanced"),F.value.plugin.length&&p.push("plugin"),p}),w=t.computed(()=>{var h,x;let p=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?p=p.replace(/{controlPlaneId}/gi,((h=i.config)==null?void 0:h.controlPlaneId)||""):i.config.app==="kongManager"&&(p=p.replace(/\/{workspace}/gi,(x=i.config)!=null&&x.workspace?`/${i.config.workspace}`:"")),p=p.replace(/{id}/gi,i.config.entityId),p});return t.watch(y,p=>{r("loading",p)},{immediate:!0}),t.onBeforeMount(async()=>{b.value=!1,y.value=!0;try{const{data:p}=await c.get(w.value);if(i.dataKey)if(typeof p[i.dataKey]<"u")B.value={...p[i.dataKey]};else throw new Error(o("errors.dataKeyUndefined",{dataKey:i.dataKey}));else i.recordResolver?B.value={...i.recordResolver(p)}:B.value={...p};Object.keys(i.configSchema).filter(x=>i.configSchema[x].forceShow).forEach(x=>{B.value&&typeof B.value[x]>"u"&&(B.value[x]=null)}),r("fetch:success",p)}catch(p){const h=l(p);C.value=h.startsWith("code")?o("baseConfigCard.errors.load"):h,b.value=!0,r("fetch:error",p)}finally{y.value=!1}}),(p,h)=>{const x=t.resolveComponent("KLabel"),S=t.resolveComponent("KSelect"),I=t.resolveComponent("KButton"),N=t.resolveComponent("KSkeleton"),$=t.resolveComponent("KEmptyState"),j=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(j,{class:"kong-ui-entity-base-config-card","title-tag":e.titleTag},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",Ro,[t.renderSlot(p.$slots,"actions",{},void 0,!0),t.createVNode(x,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1}),t.createVNode(S,{modelValue:f.value,"onUpdate:modelValue":h[0]||(h[0]=V=>f.value=V),"data-testid":"select-config-format",items:s,onChange:u},null,8,["modelValue"]),e.configCardDoc?(t.openBlock(),t.createBlock(I,{key:0,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(ee.BookIcon),{size:t.unref(Jn)},null,8,["size"])],8,Ko)]),_:1})):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[y.value?(t.openBlock(),t.createBlock(N,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):b.value?(t.openBlock(),t.createBlock($,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(C.value),1)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",Mo,[t.createVNode(pn,{"code-block-record-formatter":e.codeBlockRecordFormatter,config:e.config,"entity-type":e.entityType,"fetcher-url":w.value,format:f.value,"prop-list-types":H.value,"property-collections":F.value,record:B.value},t.createSlots({_:2},[t.renderList(Object.keys(p.$slots),V=>({name:V,fn:t.withCtx(({row:v,rowValue:Se})=>[t.renderSlot(p.$slots,V,{row:v,rowValue:Se},void 0,!0)])}))]),1032,["code-block-record-formatter","config","entity-type","fetcher-url","format","prop-list-types","property-collections","record"])])]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("span",Do,[t.renderSlot(p.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),[["__scopeId","data-v-8dfcd755"]]),vo=["novalidate"],Po=W(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},entityType:{type:String,required:!0,validator:e=>ce.includes(e)},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1},wrapperComponent:{type:String,default:"KCard"},actionTeleportTarget:{type:String,default:void 0},hideActions:{type:Boolean,default:!1},slidoutTopOffset:{type:Number,default:60},alignActionButtonToLeft:{type:Boolean,default:!1},saveButtonText:{type:String,default:void 0},cancelButtonText:{type:String,default:void 0}},emits:["loading","fetch:success","fetch:error","submit","cancel","codeBlockTabChange"],setup(e,{expose:n,emit:r}){var H;const i=r,o=e,l=yn.useRouter(),{i18n:{t:a}}=L.useI18n(),{getMessageFromError:c}=L.useErrors(),{axiosInstance:s}=L.useAxios((H=o.config)==null?void 0:H.axiosRequestConfig),d=t.ref(!1),f=t.computed(()=>!!o.editId),u=t.ref(!1),g=t.ref(""),m=t.computed(()=>o.canSubmit===!1||o.isReadonly),y=t.ref(!1),b=t.computed(()=>{var A,p;let w=`${o.config.apiBaseUrl}${o.fetchUrl}`;return o.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((A=o.config)==null?void 0:A.controlPlaneId)||""):o.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(p=o.config)!=null&&p.workspace?`/${o.config.workspace}`:"")),o.editId?(w=w.replace(/{id}/gi,o.editId),w):(w=w.replace(/\/{id}/gi,""),w)}),C=()=>{y.value=!y.value},B=()=>{o.config.cancelRoute?l.push(o.config.cancelRoute):k()},k=()=>{i("cancel")},T=()=>{m.value||i("submit")},F=t.ref([{title:a("baseForm.configuration.json"),hash:"#json"},{title:a("baseForm.configuration.yaml"),hash:"#yaml"}]);return o.config.app==="konnect"&&o.entityType!==me.Other&&F.value.splice(1,0,{title:a("baseForm.configuration.terraform"),hash:"#terraform"}),t.watch(()=>d.value,w=>{i("loading",w)},{immediate:!0}),t.onBeforeMount(async()=>{if(o.editId)try{u.value=!1,d.value=!0;const{data:w}=await s.get(b.value);i("fetch:success",w)}catch(w){const A=c(w);g.value=A.startsWith("code")?a("baseForm.errors.edit"):A,u.value=!0,i("fetch:error",w)}finally{d.value=!1}}),n({viewConfig:C,formCancel:k,formSubmit:T}),(w,A)=>{const p=t.resolveComponent("KSkeleton"),h=t.resolveComponent("KEmptyState"),x=t.resolveComponent("KAlert"),S=t.resolveComponent("KButton"),I=t.resolveComponent("KTabs"),N=t.resolveComponent("KSlideout");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.wrapperComponent),{class:"kong-ui-entity-base-form"},{default:t.withCtx(()=>[d.value?(t.openBlock(),t.createBlock(p,{key:0,type:"form"})):u.value?(t.openBlock(),t.createBlock(h,{key:1,"action-button-text":t.unref(a)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:B},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(g.value),1)]),_:1},8,["action-button-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:o.noValidate,onReset:t.withModifiers(k,["prevent"]),onSubmit:t.withModifiers(T,["prevent"])},[t.renderSlot(w.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(x,{key:0,appearance:"danger","data-testid":"form-error",message:e.errorMessage},null,8,["message"])):t.createCommentVNode("",!0),e.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.Teleport,{key:1,disabled:!e.actionTeleportTarget,to:e.actionTeleportTarget},[t.createElementVNode("div",{class:t.normalizeClass(["form-actions",{"form-actions-reverted":e.alignActionButtonToLeft}]),"data-testid":"form-actions"},[t.renderSlot(w.$slots,"form-actions",{},()=>[t.createVNode(S,{appearance:"tertiary","data-testid":`${e.entityType}-${f.value?"edit":"create"}-form-view-configuration`,onClick:A[0]||(A[0]=$=>C())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(a)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),t.createVNode(S,{appearance:"secondary","data-testid":`${e.entityType}-${f.value?"edit":"create"}-form-cancel`,disabled:e.isReadonly,type:"reset",onClick:A[1]||(A[1]=$=>!!e.actionTeleportTarget&&k())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.cancelButtonText??t.unref(a)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),t.createVNode(S,{appearance:"primary","data-testid":`${e.entityType}-${f.value?"edit":"create"}-form-submit`,disabled:m.value,type:"submit",onClick:A[2]||(A[2]=$=>!!e.actionTeleportTarget&&T())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.saveButtonText??t.unref(a)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)],2)],8,["disabled","to"]))],40,vo)),t.createVNode(N,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":e.slidoutTopOffset,title:t.unref(a)("baseForm.configuration.title"),visible:y.value,onClose:A[4]||(A[4]=$=>C())},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(a)("baseForm.configuration.message")),1),t.createVNode(I,{"data-testid":"form-view-configuration-slideout-tabs",tabs:F.value,onChange:A[3]||(A[3]=$=>i("codeBlockTabChange",$.replace("#","")))},{json:t.withCtx(()=>[t.createVNode(Te,{config:e.config,"entity-record":o.formFields,"fetcher-url":b.value,"request-method":o.editId?"put":"post"},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(Ue,{"entity-record":o.formFields},null,8,["entity-record"])]),terraform:t.withCtx(()=>[t.createVNode(qe,{"entity-record":o.formFields,"entity-type":e.entityType},null,8,["entity-record","entity-type"])]),_:1},8,["tabs"])]),_:1},8,["offset-top","title","visible"])]),_:3})}}}),[["__scopeId","data-v-7c5c8d6b"]]),Uo=["data-truncate"],qo=W(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(e){const n=e,r=t.computed(()=>{var C;return((C=n.rowEl)==null?void 0:C.querySelector(`[data-testid="${n.keyName}"]`))||null}),i=t.computed(()=>{var C;return((C=r.value)==null?void 0:C.querySelector('[data-truncate="true"]'))||null}),o=t.computed(()=>{var B,k;const C=(B=n.rowEl)==null?void 0:B.querySelectorAll("td");return C?((k=C[0])==null?void 0:k.getAttribute("data-testid"))===n.keyName:!0}),l=t.computed(()=>o.value||n.tooltip);let a;const c=()=>{a&&(a.disconnect(),a=void 0)},s=()=>{var B,k,T;let C=((B=r.value)==null?void 0:B.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const F=window.getComputedStyle(r.value);C-=(parseFloat(F.paddingLeft)||0)+(parseFloat(F.paddingRight)||0)}f.value=((k=i.value)==null?void 0:k.getBoundingClientRect().width)||0,u.value=C,g.value=((T=d.value)==null?void 0:T.innerText)||""},d=t.ref({}),f=t.ref(0),u=t.ref(0),g=t.ref(""),m=t.computed(()=>[i.value,r.value]),y=t.watch(m,C=>{if(l.value&&(c(),"ResizeObserver"in window&&window)){a=new ResizeObserver(B=>{window.requestAnimationFrame(()=>{!Array.isArray(B)||!B.length||s()})});for(const B of C)B&&a.observe(B)}},{immediate:!0,flush:"post",deep:!0}),b=t.computed(()=>l.value?f.value>u.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{y()}),(C,B)=>{const k=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:d,class:"content-wrapper"},[l.value?(t.openBlock(),t.createElementBlock("span",{key:0,"data-truncate":l.value||void 0},[t.createVNode(k,{"max-width":"300",placement:"bottom-start",text:b.value?g.value:""},{default:t.withCtx(()=>[t.renderSlot(C.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Uo)):t.renderSlot(C.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-a3a65cac"]]),Ho={class:"toolbar-container"},Yo={key:0,class:"toolbar-button-container"},Wo={key:0,class:"hidden"},zo=W(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},rowKey:{type:[String,Function],default:"id"},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:null},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},paginationAttributes:{type:Object,default:()=>({})},hidePaginationWhenOptional:{type:Boolean,default:!0},disableSorting:{type:Boolean,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:""},defaultTablePreferences:{type:Object,default:null,required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1},hidePagination:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:void 0},disablePaginationPageJump:{type:Boolean,default:void 0,validator:e=>(e&&console.warn("EntityBaseTable: `disablePaginationPageJump` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),typeof e=="boolean")},paginationType:{type:String,default:void 0,validator:e=>(e&&console.warn("EntityBaseTable: `paginationType` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),["default","offset"].includes(e))}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked","state"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=L.useI18n(),l=t.computed(()=>{var h,x;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(h=r.errorMessage)==null?void 0:h.title,message:(x=r.errorMessage)==null?void 0:x.message}}),a=t.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),c=t.computed(()=>{const h=[];return Object.keys(r.tableHeaders).forEach(S=>{const I=r.tableHeaders[S];h.push({label:I.label??S,key:S,sortable:I.sortable??!1,hidable:I.hidable??!0})}),r.enableEntityActions&&h.push({key:"actions",hideLabel:!0}),h}),s=h=>({"data-rowid":h.id,"data-testid":h.name,...r.rowAttributes(h)}),d=t.ref({}),f=h=>{var x;return(x=d.value)==null?void 0:x.$el.querySelector(`[data-rowid="${h.id}"]`)},u=h=>{const x={"data-testid":h.headerKey,...r.cellAttributes(h)};return h.colIndex===0&&(x.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),x},g=h=>{k(h),i("state",h)},m=()=>{i("empty-state-cta-clicked"),y()},y=()=>{i("clear-search-input")},b=t.computed(()=>r.disableRowClick?void 0:(h,x)=>{i("click:row",x)}),C=h=>{i("sort",h)},{hideTableToolbar:B,handleStateChange:k}=L.useTableState(()=>r.query),{setTablePreferences:T,getTablePreferences:F}=xn(),H=t.ref(F(a.value,r.defaultTablePreferences)),w=t.computed(()=>{const h=F(a.value);return{...r.initialFetcherParams,...h}}),A=h=>{H.value=h,c.value.forEach(x=>{!("hidable"in x)||!H.value.columnVisibility||x.hidable===!1&&(H.value.columnVisibility[x.key]=!0)}),a.value&&T(a.value,h)},p=t.computed(()=>({disablePageJump:r.disablePaginationPageJump,offset:r.paginationType==="offset",...r.paginationAttributes}));return(h,x)=>{const S=t.resolveComponent("KTableData"),I=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(I,{class:"kong-ui-entity-base-table",title:e.title,"title-tag":e.titleTag},{default:t.withCtx(()=>[t.createVNode(S,{ref_key:"tableRefs",ref:d,"cache-identifier":a.value,"cell-attrs":u,"client-sort":e.enableClientSort,"empty-state-action-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?void 0:e.emptyStateOptions.ctaPath,"empty-state-icon-variant":e.query?"search":"kong","empty-state-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,error:l.value.hasError,"error-state-message":l.value.message,"error-state-title":l.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),headers:c.value,"hide-pagination":e.hidePagination,"hide-pagination-when-optional":e.hidePaginationWhenOptional,"hide-toolbar":e.hideToolbar??t.unref(B),"initial-fetcher-params":w.value,loading:e.isLoading,"pagination-attributes":p.value,"resize-columns":"","row-attrs":s,"row-key":e.rowKey,"search-input":e.query,"sort-handler-function":e.enableClientSort?e.sortHandlerFunction:void 0,sortable:!e.disableSorting,"table-preferences":H.value,onEmptyStateActionClick:m,"onRow:click":b.value,onSort:x[0]||(x[0]=N=>C(N)),onState:g,"onUpdate:tablePreferences":A},t.createSlots({toolbar:t.withCtx(()=>[t.createElementVNode("div",Ho,[t.renderSlot(h.$slots,"toolbar-filter",{},void 0,!0),h.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",Yo,[t.renderSlot(h.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)])]),"action-items":t.withCtx(({row:N})=>[t.renderSlot(h.$slots,"actions",{row:N},void 0,!0)]),_:2},[h.$slots["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(h.$slots,"empty-state",{},void 0,!0)]),key:"0"}:void 0,t.renderList(e.tableHeaders,(N,$)=>({name:$,fn:t.withCtx(({row:j,rowValue:V})=>[t.createVNode(qo,{"key-name":String($),"row-el":f(j),tooltip:N.tooltip},{default:t.withCtx(()=>[t.renderSlot(h.$slots,$,{row:j,rowKey:e.rowKey,rowValue:V},()=>[t.createTextVNode(t.toDisplayString(V),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),e.query?void 0:{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.createVNode(t.unref(ee.AddIcon))]),key:"1"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-pagination-when-optional","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click"]),h.$slots["outside-actions"]&&t.unref(B)?(t.openBlock(),t.createElementBlock("div",Wo,[t.renderSlot(h.$slots,"outside-actions",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3},8,["title","title-tag"])}}}),[["__scopeId","data-v-44153100"]]),Jo={key:0,class:"kong-ui-entity-delete-error"},Go={key:1,class:"description"},Qo=W(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18nT:r}=L.useI18n(),i=e,o=n,l=t.computed(()=>i.needConfirm?i.entityName:""),a=()=>{o("cancel")},c=()=>{o("proceed")};return(s,d)=>{const f=t.resolveComponent("KAlert"),u=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(u,{"action-button-appearance":"danger","action-button-disabled":e.actionPending,"action-button-text":"Yes, delete",class:"kong-ui-entity-delete-modal","confirmation-text":l.value,title:e.title,visible:e.visible,onCancel:a,onProceed:c},{default:t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",Jo,[t.createVNode(f,{appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:i.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.entityType),1)]),_:2},[i.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(i.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),i.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",Go,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(i.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-button-disabled","confirmation-text","title","visible"])}}}),[["__scopeId","data-v-4361d622"]]),Zo={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Xo={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},ea=["fill"],ta={mask:"url(#mask0_180_20349)"},na=["fill"],mn=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Un})`}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",Zo,[t.createElementVNode("mask",Xo,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,ea)]),t.createElementVNode("g",ta,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,na)])]))}}),ra={key:1,class:"kong-ui-entity-filter"},ia={class:"kong-ui-entity-filter-menu"},oa=["data-testid"],aa=["onClick","onKeydown"],la={class:"menu-item-indicator"},ca={class:"menu-item-body"},sa=["for"],da={class:"menu-item-buttons"},ua={class:"filter-clear-button-container"},fa=W(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const{i18n:{t:r}}=L.useI18n(),i=e,o=n,l=t.ref(!1),a=t.ref({}),c=t.ref(new Set),s=t.computed(()=>{const w=[];return new URLSearchParams(i.modelValue).forEach((A,p)=>{A!==""&&w.push(p)}),w}),d=t.computed(()=>{const w=i.config.fields;return Object.keys(w).filter(A=>{var p;return(p=w==null?void 0:w[A])==null?void 0:p.searchable}).map(A=>({label:w[A].label||A,value:A,expanded:!1}))});t.watch(()=>i.modelValue,w=>{a.value={},new URLSearchParams(w).forEach((A,p)=>{a.value[p]=A})});const f=()=>{l.value=!l.value},u=w=>{c.value.has(w)?c.value.delete(w):c.value.add(w)},g=w=>{o("update:modelValue",w)},m=()=>{g("")},y=w=>`filter-${w}`,b=w=>{var A,p;return(((p=(A=i.config.schema)==null?void 0:A[w])==null?void 0:p.values)??[]).map(h=>typeof h=="string"?{value:h,label:h}:h)},C=w=>{var A,p;return((p=(A=i.config.schema)==null?void 0:A[w])==null?void 0:p.type)??"text"},B=w=>{a.value={...a.value,[w]:""},T()},k=()=>{a.value={},T(!0)},T=(w=!1)=>{const A=Object.keys(a.value).reduce((p,h)=>(a.value[h]&&(p[h]=`${a.value[h]}`),p),{});w&&(l.value=!1),o("update:modelValue",new URLSearchParams(A).toString())},F=w=>{var A,p;return!!((p=(A=i.config.schema)==null?void 0:A[w])!=null&&p.filterFunction)},H=(w,A)=>{var h;const p=(h=i.config.schema)==null?void 0:h[w];return(p==null?void 0:p.filterFunction)===void 0?!0:p.filterFunction(A)};return(w,A)=>{const p=t.resolveComponent("KInput"),h=t.resolveComponent("KButton"),x=t.resolveComponent("KSelect");return e.config.isExactMatch?(t.openBlock(),t.createBlock(p,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":g},{before:t.withCtx(()=>[t.createVNode(mn)]),after:t.withCtx(()=>[t.withDirectives(t.createVNode(t.unref(ee.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:m},null,512),[[t.vShow,e.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",ra,[t.createVNode(h,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:t.withCtx(()=>[t.createVNode(mn),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(s.value.length>0?`(${s.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[t.vShow,l.value]]),t.withDirectives(t.createElementVNode("div",ia,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,S=>{var I,N;return t.openBlock(),t.createElementBlock("div",{key:S.value,class:"kong-ui-entity-filter-menu-item","data-testid":S.value},[t.createElementVNode("span",{class:t.normalizeClass(["menu-item-title",{expanded:c.value.has(S.value)}]),role:"button",tabindex:"0",onClick:$=>u(S.value),onKeydown:t.withKeys($=>u(S.value),["enter"])},[t.createTextVNode(t.toDisplayString(S.label)+" ",1),t.withDirectives(t.createElementVNode("span",la,null,512),[[t.vShow,s.value.includes(S.value)]]),t.createVNode(t.unref(ee.ChevronDownIcon),{class:t.normalizeClass(["menu-item-expand-icon",{expanded:c.value.has(S.value)}]),color:t.unref(Hn)},null,8,["class","color"])],42,aa),t.withDirectives(t.createElementVNode("div",ca,[t.createElementVNode("label",{class:"menu-item-label",for:y(S.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,sa),((N=(I=e.config.schema)==null?void 0:I[S.value])==null?void 0:N.type)==="select"?(t.openBlock(),t.createBlock(x,{key:0,id:y(S.value),modelValue:a.value[S.value],"onUpdate:modelValue":$=>a.value[S.value]=$,"enable-filtering":F(S.value),"filter-function":$=>H(S.value,$),items:b(S.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","enable-filtering","filter-function","items","placeholder"])):(t.openBlock(),t.createBlock(p,{key:1,id:y(S.value),modelValue:a.value[S.value],"onUpdate:modelValue":$=>a.value[S.value]=$,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:C(S.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[t.vShow,c.value.has(S.value)]]),t.withDirectives(t.createElementVNode("div",da,[t.createVNode(h,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:A[0]||(A[0]=$=>T(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(h,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:$=>B(S.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])],512),[[t.vShow,c.value.has(S.value)]])],8,oa)}),128)),t.createElementVNode("div",ua,[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:k},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[t.vShow,l.value]])]))}}}),[["__scopeId","data-v-084f7978"]]),pa=t.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18n:{t:r},i18nT:i}=L.useI18n(),o=e,l=n,a=t.ref(!1),c=t.computed(()=>o.action==="enable"?r("toggleModal.enable.title",{entityType:o.entityType}):r("toggleModal.disable.title",{entityType:o.entityType})),s=t.computed(()=>o.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),d=()=>l("cancel"),f=async()=>{if(o.onConfirm){a.value=!0;try{await o.onConfirm(),l("proceed")}catch(u){console.error(u)}finally{a.value=!1}}};return(u,g)=>{const m=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(m,{"action-button-disabled":a.value,"action-button-text":s.value,"data-testid":`${e.entityType}-${e.entityId}-toggle-prompt`,title:c.value,visible:e.visible,onCancel:d,onProceed:f},{default:t.withCtx(()=>[t.createVNode(t.unref(i),{keypath:`toggleModal.${o.action}.message`,scope:"global"},{entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.entityType),1)]),entityName:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),ma=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,r=t.ref(void 0),i=t.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,l)=>i.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):t.createCommentVNode("",!0)}}),M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function ha(e,n=0){return(M[e[n+0]]+M[e[n+1]]+M[e[n+2]]+M[e[n+3]]+"-"+M[e[n+4]]+M[e[n+5]]+"-"+M[e[n+6]]+M[e[n+7]]+"-"+M[e[n+8]]+M[e[n+9]]+"-"+M[e[n+10]]+M[e[n+11]]+M[e[n+12]]+M[e[n+13]]+M[e[n+14]]+M[e[n+15]]).toLowerCase()}let He;const ga=new Uint8Array(16);function ya(){if(!He){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");He=crypto.getRandomValues.bind(crypto)}return He(ga)}const hn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ba(e,n,r){var o;if(hn.randomUUID&&!e)return hn.randomUUID();e=e||{};const i=e.random??((o=e.rng)==null?void 0:o.call(e))??ya();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,ha(i)}const Ca=["aria-labelledby"],ka={class:"form-section-wrapper"},xa={key:1,class:"form-section-description"},Sa={key:2,class:"form-section-footer"},wa={class:"form-section-content"},Aa=W(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(e){const n=t.useSlots(),r=ba();return(i,o)=>(t.openBlock(),t.createElementBlock("div",{"aria-labelledby":e.title?t.unref(r):void 0,class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}]),role:"group"},[t.createElementVNode("div",ka,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.titleTag),{key:0,id:t.unref(r),class:"form-section-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1},8,["id"])):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",xa,[t.renderSlot(i.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",Sa,[t.renderSlot(i.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",wa,[t.renderSlot(i.$slots,"default",{},void 0,!0)])])],10,Ca))}}),[["__scopeId","data-v-b1f74200"]]),Ba={class:"ff-form-section"},_a={class:"header"},Ea={key:0,class:"step"},Ta={class:"header-content"},$a={class:"header-title"},Na={key:0,class:"header-description"},Fa={key:1,class:"header-extra"},Ia={class:"content"},Oa=W(t.defineComponent({__name:"EntityFormBlock",props:{step:{},title:{default:""},description:{default:""}},setup(e){const n=t.useSlots();return(r,i)=>(t.openBlock(),t.createElementBlock("div",Ba,[t.createElementVNode("header",_a,[r.step!=null?(t.openBlock(),t.createElementBlock("div",Ea,t.toDisplayString(r.step),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Ta,[t.createElementVNode("h2",$a,[t.renderSlot(r.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(r.title),1)],!0)]),r.description||n.description?(t.openBlock(),t.createElementBlock("div",Na,[t.renderSlot(r.$slots,"description",{},()=>[t.createTextVNode(t.toDisplayString(r.description),1)],!0)])):t.createCommentVNode("",!0)]),n.extra?(t.openBlock(),t.createElementBlock("div",Fa,[t.renderSlot(r.$slots,"extra",{},void 0,!0)])):t.createCommentVNode("",!0)]),t.createElementVNode("div",Ia,[t.renderSlot(r.$slots,"default",{},void 0,!0)])]))}}),[["__scopeId","data-v-cb6d2e95"]]),La={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},Va={key:0,class:"deleted-entity"},Da={key:1},Ra=["onClick"],Ka=W(t.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(e){const n=e,r=t.ref(),{isTruncated:i}=L.useTruncationDetector(r),{i18n:{t:o}}=L.useI18n(),l=o("global.actions.copyId"),a=t.ref(l),c=t.computed(()=>n.entityLinkData.deleted??!1),s=t.computed(()=>{var u;return(u=n.entityLinkData.id)!=null&&u.toString().includes(":")?n.entityLinkData.id.toString().split(":")[1]:n.entityLinkData.id}),d=t.computed(()=>{var u;return`${(u=s.value)==null?void 0:u.toString().slice(0,5)} (deleted)`}),f=async u=>{await u(s.value||"")&&(a.value=o("global.actions.copyToClipboard"),setTimeout(()=>{a.value=l},1800))};return(u,g)=>{const m=t.resolveComponent("KTooltip"),y=t.resolveComponent("KExternalLink"),b=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",La,[c.value?(t.openBlock(),t.createElementBlock("div",Va,t.toDisplayString(d.value),1)):s.value?s.value?(t.openBlock(),t.createBlock(y,{key:2,class:"entity-link","hide-icon":!e.newWindow,href:e.externalLink,target:e.newWindow?"_blank":"_self"},{default:t.withCtx(()=>[t.createVNode(m,{text:t.unref(i)&&e.entityLinkData.label||""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},t.toDisplayString(e.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Da,t.toDisplayString(" – "))),s.value&&e.allowCopy?(t.openBlock(),t.createBlock(m,{key:a.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:a.value},{default:t.withCtx(()=>[t.createVNode(b,null,{default:t.withCtx(({copyToClipboard:C})=>[t.createElementVNode("span",{class:"entity-link-copy-id",onClick:t.withModifiers(B=>f(C),["stop"])},[t.createVNode(t.unref(ee.CopyIcon),{class:"copy-icon",color:t.unref(Yn),"data-testid":"copy-id",size:t.unref(zn)},null,8,["color","size"])],8,Ra)]),_:1})]),_:1},8,["text"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-96efdfa5"]]),Ma={class:"kong-ui-public-entity-empty-state"},ja={class:"entity-empty-state-content"},va={key:0,class:"empty-state-image"},Pa={key:1,class:"entity-empty-state-title"},Ua={key:2,class:"entity-empty-state-description"},qa={key:3,class:"entity-empty-state-pricing"},Ha={key:0,class:"entity-empty-state-message"},Ya={key:1,class:"entity-empty-state-action"},Wa={key:2,class:"entity-empty-state-card-container"},za={key:0,class:"feature-icon"},Ja={class:"card-header"},Ga=["title"],Qa={key:3,class:"entity-empty-state-bottom-container"},Za=W(t.defineComponent({__name:"EntityEmptyState",props:{appearance:{type:String,default:()=>"primary",validator:e=>we.includes(e)},title:{type:String,default:""},description:{type:String,default:""},pricing:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},actionButtonText:{type:String,default:""},learnMore:{type:Boolean,default:!1},features:{type:Array,default:()=>[]}},emits:["click:create","click:learn-more"],setup(e){const n=e,{i18n:{t:r}}=L.useI18n(),i=t.ref(!1),o=t.computed(()=>i.value&&!!n.actionButtonText),l=t.computed(()=>we.includes(n.appearance)?n.appearance:["primary",n.appearance]);return t.onBeforeMount(async()=>{i.value=await n.canCreate()}),t.onMounted(()=>t.warn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
52
52
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)),(a,c)=>{const s=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",Ma,[t.createElementVNode("div",ja,[a.$slots.image?(t.openBlock(),t.createElementBlock("div",va,[t.renderSlot(a.$slots,"image",{},void 0,!0)])):t.createCommentVNode("",!0),e.title||a.$slots.title?(t.openBlock(),t.createElementBlock("div",Pa,[t.createElementVNode("h1",{class:t.normalizeClass(l.value)},[t.renderSlot(a.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)],!0)],2)])):t.createCommentVNode("",!0),e.description||a.$slots.default?(t.openBlock(),t.createElementBlock("div",Ua,[t.renderSlot(a.$slots,"default",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),e.pricing||a.$slots.pricing?(t.openBlock(),t.createElementBlock("div",qa,[t.createElementVNode("p",null,[t.createElementVNode("b",null,t.toDisplayString(t.unref(r)("emptyState.pricingTitle")),1),c[2]||(c[2]=t.createTextVNode()),t.renderSlot(a.$slots,"pricing",{},()=>[t.createTextVNode(t.toDisplayString(e.pricing),1)],!0)])])):t.createCommentVNode("",!0)]),a.$slots.message?(t.openBlock(),t.createElementBlock("div",Ha,[t.renderSlot(a.$slots,"message",{},void 0,!0)])):t.createCommentVNode("",!0),o.value||e.learnMore||a.$slots.actions?(t.openBlock(),t.createElementBlock("div",Ya,[t.renderSlot(a.$slots,"actions",{},()=>[o.value?(t.openBlock(),t.createBlock(t.unref(le.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:e.appearance==="secondary"?"medium":"large",onClick:c[0]||(c[0]=d=>a.$emit("click:create"))},{default:t.withCtx(()=>[t.createVNode(t.unref(ee.AddIcon)),t.createTextVNode(" "+t.toDisplayString(e.actionButtonText),1)]),_:1},8,["size"])):t.createCommentVNode("",!0),e.learnMore?(t.openBlock(),t.createBlock(t.unref(le.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:e.appearance==="secondary"?"medium":"large",onClick:c[1]||(c[1]=d=>a.$emit("click:learn-more"))},{default:t.withCtx(()=>[t.createVNode(t.unref(ee.BookIcon),{decorative:""}),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("emptyState.learnMore")),1)]),_:1},8,["size"])):t.createCommentVNode("",!0)],!0)])):t.createCommentVNode("",!0),e.features.length?(t.openBlock(),t.createElementBlock("div",Wa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.features,(d,f)=>(t.openBlock(),t.createBlock(s,{key:d,class:"entity-empty-state-card"},{title:t.withCtx(()=>[a.$slots[`feature-${f}-icon`]?(t.openBlock(),t.createElementBlock("div",za,[t.renderSlot(a.$slots,`feature-${f}-icon`,{},void 0,!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",Ja,t.toDisplayString(d.title),1)]),default:t.withCtx(()=>[t.createElementVNode("div",{title:d.description},t.toDisplayString(d.description),9,Ga)]),_:2},1024))),128))])):t.createCommentVNode("",!0),a.$slots.bottom?(t.openBlock(),t.createElementBlock("div",Qa,[t.renderSlot(a.$slots,"bottom",{},void 0,!0)])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-645aae54"]]),Xa={key:1},el=t.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(e){const n=e,r=t.computed(()=>{if(Array.isArray(n.tags))return n.tags;if(typeof n.tags=="string")try{const i=JSON.parse(n.tags);return Array.isArray(i)?i:[]}catch{return[]}return[]});return(i,o)=>{var l;return((l=r.value)==null?void 0:l.length)>0?(t.openBlock(),t.createBlock(t.unref(le.KTruncate),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,a=>(t.openBlock(),t.createBlock(t.unref(le.KBadge),{key:a,"max-width":e.tagMaxWidth,onClick:o[0]||(o[0]=t.withModifiers(()=>{},["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(t.openBlock(),t.createElementBlock("span",Xa,"-"))}}}),{useAxios:tl,useDeleteUrlBuilder:nl,useErrors:rl,useExternalLinkCreator:il,useFetchUrlBuilder:ol,useFetcher:al,useFetcherCacheKey:ll,useDebouncedFilter:cl,useStringHelpers:sl,useHelpers:dl,useGatewayFeatureSupported:ul,useTruncationDetector:fl,useValidators:pl,useSchemaProvider:ml,useTableState:hl}=L;E.Appearances=we,E.ConfigCardDisplay=pn,E.ConfigCardItem=Ee,E.ConfigurationSchemaSection=Y,E.ConfigurationSchemaType=O,E.EntityBaseConfigCard=jo,E.EntityBaseForm=Po,E.EntityBaseFormType=Je,E.EntityBaseTable=zo,E.EntityDeleteModal=Qo,E.EntityEmptyState=Za,E.EntityFilter=fa,E.EntityFormBlock=Oa,E.EntityFormSection=Aa,E.EntityLink=Ka,E.EntityToggleModal=pa,E.EntityTypes=ze,E.FetcherStatus=G,E.InternalLinkItem=st,E.JsonCodeBlock=Te,E.PermissionsWrapper=ma,E.SupportedEntityType=me,E.SupportedEntityTypesArray=ce,E.TableTags=el,E.TerraformCodeBlock=qe,E.YamlCodeBlock=Ue,E.useAxios=tl,E.useDebouncedFilter=cl,E.useDeleteUrlBuilder=nl,E.useErrors=rl,E.useExternalLinkCreator=il,E.useFetchUrlBuilder=ol,E.useFetcher=al,E.useFetcherCacheKey=ll,E.useGatewayFeatureSupported=ul,E.useHelpers=dl,E.useSchemaProvider=ml,E.useStringHelpers=sl,E.useTableState=hl,E.useTruncationDetector=fl,E.useValidators=pl,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-66d61bea]{align-items:center;border-bottom:var(--70f369b3);box-sizing:border-box;display:var(--67c2fae6);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-66d61bea]{box-sizing:border-box;padding-right:16px;width:var(--847b138c)}.config-card-details-row .config-card-details-label label[data-v-66d61bea]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-66d61bea]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-66d61bea]{min-width:0}.config-card-details-row .config-card-details-value[data-v-66d61bea]{box-sizing:border-box;width:var(--847687d6)}.config-card-details-row .config-card-details-value .truncated[data-v-66d61bea]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-66d61bea]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-66d61bea] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-66d61bea]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-66d61bea]{margin-right:4px}.config-card-details-row[data-v-66d61bea] .k-label{margin-bottom:0}.config-card-details-row[data-v-66d61bea] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-66d61bea] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-9b9ea6f9]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-9b9ea6f9]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-9b9ea6f9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-9b9ea6f9] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-9b9ea6f9]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-4f672e9f]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-4f672e9f] .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-4f672e9f] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-4f672e9f] .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-4f672e9f] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-4f672e9f]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-4f672e9f] .k-button:last-of-type,.form-actions[data-v-4f672e9f] .k-button:nth-last-of-type(2){margin-left:16px}.form-actions-reverted[data-v-4f672e9f]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-44153100]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-44153100]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-44153100]{display:none}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-645aae54]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-645aae54]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-645aae54]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-645aae54]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-645aae54]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-645aae54]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-645aae54]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-645aae54]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-645aae54]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{width:640px}}
|
|
1
|
+
.config-card-fieldset[data-v-dc1e39a1]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-dc1e39a1]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-66d61bea]{align-items:center;border-bottom:var(--70f369b3);box-sizing:border-box;display:var(--67c2fae6);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-66d61bea]{box-sizing:border-box;padding-right:16px;width:var(--847b138c)}.config-card-details-row .config-card-details-label label[data-v-66d61bea]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-66d61bea]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-66d61bea]{min-width:0}.config-card-details-row .config-card-details-value[data-v-66d61bea]{box-sizing:border-box;width:var(--847687d6)}.config-card-details-row .config-card-details-value .truncated[data-v-66d61bea]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-66d61bea]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-66d61bea] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-66d61bea]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-66d61bea]{margin-right:4px}.config-card-details-row[data-v-66d61bea] .k-label{margin-bottom:0}.config-card-details-row[data-v-66d61bea] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-66d61bea] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--eca0976a);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d67757a9]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-8dfcd755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-8dfcd755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-8dfcd755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-8dfcd755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-8dfcd755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-7c5c8d6b]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-7c5c8d6b] .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-7c5c8d6b] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-7c5c8d6b] .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-7c5c8d6b] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-7c5c8d6b]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-7c5c8d6b] .k-button:last-of-type,.form-actions[data-v-7c5c8d6b] .k-button:nth-last-of-type(2){margin-left:16px}.form-actions-reverted[data-v-7c5c8d6b]{direction:rtl}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-44153100]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-44153100]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-44153100]{display:none}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-084f7978]{width:100%}.kong-ui-entity-filter-clear[data-v-084f7978]{cursor:pointer}.kong-ui-entity-filter[data-v-084f7978]{display:flex;position:relative}.kong-ui-entity-filter[data-v-084f7978] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-084f7978] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-084f7978]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-084f7978]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-084f7978]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-084f7978]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-084f7978]{color:#232633}.menu-item-expand-icon[data-v-084f7978]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-084f7978]{transform:rotate(180deg)}.menu-item-indicator[data-v-084f7978]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-084f7978]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-084f7978] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-084f7978] .k-input{width:100%}.menu-item-body[data-v-084f7978] .k-select-input .input{font-size:12px}.menu-item-body[data-v-084f7978] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-084f7978]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-084f7978]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-084f7978]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.ff-form-section .header[data-v-cb6d2e95]{align-items:flex-start;display:flex;gap:8px}.ff-form-section .step[data-v-cb6d2e95]{align-items:center;background:#fff;border:1px solid #afb7c5;border-radius:100px;display:flex;flex:0 0 auto;height:32px;justify-content:center;padding:4px;width:32px}.ff-form-section .header-content[data-v-cb6d2e95]{align-items:flex-start;display:flex;flex:1 1 auto;flex-direction:column;gap:8px;padding-top:4px}.ff-form-section .header-title[data-v-cb6d2e95]{color:#000933;font-size:18px;font-weight:700;line-height:24px;margin:0}.ff-form-section .header-description[data-v-cb6d2e95]{color:#52596e;font-size:14px;line-height:20px;margin:0}.ff-form-section .header-extra[data-v-cb6d2e95]{align-items:center;display:flex;flex:0 0 auto;gap:8px;justify-content:flex-end}.ff-form-section .content[data-v-cb6d2e95]{background:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;display:flex;flex-direction:column;gap:20px;margin-left:16px;margin-top:20px;padding:20px 24px}.kong-ui-public-entity-link[data-v-96efdfa5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-96efdfa5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5]{display:flex;flex:1}.kong-ui-public-entity-link .entity-link[data-v-96efdfa5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-96efdfa5]{display:inline-block;font-weight:400;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-96efdfa5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-96efdfa5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-645aae54]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:24px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-645aae54]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-645aae54]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-645aae54]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-645aae54]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1.secondary[data-v-645aae54]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-645aae54],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-645aae54]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-645aae54]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-645aae54]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-645aae54]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;margin-top:8px;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-645aae54]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-645aae54] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-645aae54] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{border-top:1px solid #e0e4ea;display:flex;flex-direction:column;gap:16px;padding-top:48px;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-bottom-container[data-v-645aae54]{width:640px}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { AxiosError } from 'axios';
|
|
3
3
|
import type { KonnectBaseEntityConfig, KongManagerBaseEntityConfig, ConfigurationSchema, PluginConfigurationSchema, RecordItem, SupportedEntityType } from '../../types';
|
|
4
|
-
import { type CodeFormat } from './ConfigCardDisplay.vue';
|
|
4
|
+
import { type CodeFormat, type Format } from './ConfigCardDisplay.vue';
|
|
5
5
|
import type { HeaderTag } from '@kong/kongponents';
|
|
6
6
|
declare var __VLS_8: {}, __VLS_11: {}, __VLS_53: string, __VLS_54: {
|
|
7
7
|
row: RecordItem;
|
|
@@ -116,6 +116,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
116
116
|
loading: (isLoading: boolean) => any;
|
|
117
117
|
"fetch:success": (data: Record<string, any>) => any;
|
|
118
118
|
"fetch:error": (error: AxiosError<unknown, any>) => any;
|
|
119
|
+
configFormatChange: (format: Format) => any;
|
|
119
120
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
120
121
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
121
122
|
config: {
|
|
@@ -218,6 +219,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
218
219
|
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
219
220
|
"onFetch:success"?: ((data: Record<string, any>) => any) | undefined;
|
|
220
221
|
"onFetch:error"?: ((error: AxiosError<unknown, any>) => any) | undefined;
|
|
222
|
+
onConfigFormatChange?: ((format: Format) => any) | undefined;
|
|
221
223
|
}>, {
|
|
222
224
|
label: string;
|
|
223
225
|
codeBlockRecordFormatter: (entityRecord: Record<string, any>, format: CodeFormat) => Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityBaseConfigCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-config-card/EntityBaseConfigCard.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EntityBaseConfigCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-config-card/EntityBaseConfigCard.vue"],"names":[],"mappings":"AAgkBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,UAAU,EAEV,mBAAmB,EACpB,MAAM,aAAa,CAAA;AAGpB,OAA0B,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAGzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAqpBlD,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,QAAW,EAAE,QAAQ;;;CAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,GACzE;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAyIhD,QAAA,MAAM,eAAe;IAKnB,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,4CAA4C;;cAE1B,QAAQ,CAAC,mBAAmB,CAAC;;;;IAI/C;;OAEG;;cAEe,QAAQ,CAAC,mBAAmB,CAAC;;yBAE5B,mBAAmB;;IAEtC,wDAAwD;;;;;;IAMxD,gEAAgE;;cAE9C,QAAQ,CAAC,yBAAyB,CAAC;;;;IAIrD;;;;;;;OAOG;;;;;IAKH;;;OAGG;;;;;;IAMH;;;OAGG;;cAEiB,QAAQ,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;;wBAE9B,GAAG;;IAErB;;OAEG;;cAEiB,QAAQ,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;gCAElF,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;IAE7C;;OAEG;;;;;IAKH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;cAOe,QAAQ,CAAC,SAAS,CAAC;;;;;;;;;IApGrC,oHAAoH;;cAElG,QAAQ,CAAC,uBAAuB,GAAG,2BAA2B,CAAC;;4BAE3D,uBAAuB,GAAG,2BAA2B,KAAG,OAAO;;IAQrF,4CAA4C;;cAE1B,QAAQ,CAAC,mBAAmB,CAAC;;;;IAI/C;;OAEG;;cAEe,QAAQ,CAAC,mBAAmB,CAAC;;yBAE5B,mBAAmB;;IAEtC,wDAAwD;;;;;;IAMxD,gEAAgE;;cAE9C,QAAQ,CAAC,yBAAyB,CAAC;;;;IAIrD;;;;;;;OAOG;;;;;IAKH;;;OAGG;;;;;;IAMH;;;OAGG;;cAEiB,QAAQ,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;;wBAE9B,GAAG;;IAErB;;OAEG;;cAEiB,QAAQ,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;gCAElF,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;IAE7C;;OAEG;;;;;IAKH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;cAOe,QAAQ,CAAC,SAAS,CAAC;;;;;;;;;;6CA5BO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,UAAU,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;2BARvE,GAAG,KAAK,GAAG;;;;4EAwC/C,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -128,6 +128,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
128
128
|
"fetch:success": (data: Record<string, any>) => any;
|
|
129
129
|
"fetch:error": (error: AxiosError<unknown, any>) => any;
|
|
130
130
|
submit: () => any;
|
|
131
|
+
codeBlockTabChange: (data: string) => any;
|
|
131
132
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
132
133
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
133
134
|
config: {
|
|
@@ -244,6 +245,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
244
245
|
"onFetch:success"?: ((data: Record<string, any>) => any) | undefined;
|
|
245
246
|
"onFetch:error"?: ((error: AxiosError<unknown, any>) => any) | undefined;
|
|
246
247
|
onSubmit?: (() => any) | undefined;
|
|
248
|
+
onCodeBlockTabChange?: ((data: string) => any) | undefined;
|
|
247
249
|
}>, {
|
|
248
250
|
fetchUrl: string;
|
|
249
251
|
editId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityBaseForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-form/EntityBaseForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EntityBaseForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-form/EntityBaseForm.vue"],"names":[],"mappings":"AA8aA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AACnF,OAAO,EAA6B,mBAAmB,EAAE,MAAM,aAAa,CAAA;AA6mB5E,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAuJvD,QAAA,MAAM,eAAe;IAMnB,oHAAoH;;cAElG,QAAQ,CAAC,qBAAqB,GAAG,yBAAyB,CAAC;;4BAEvD,qBAAqB,GAAG,yBAAyB,KAAG,OAAO;;IAOjF,0FAA0F;;;;;;IAM1F;;OAEG;;cAEe,QAAQ,CAAC,mBAAmB,CAAC;;yBAE5B,mBAAmB;;IAEtC;;;;;;;OAOG;;;;;;IAMH,iFAAiF;;;;;;IAMjF,qEAAqE;;;;;;IAMrE,qEAAqE;;;;;;IAMrE,+DAA+D;;cAE7C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;IAG/C;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;sBA1sBc,IAAI;sBAYO,IAAI;sBAKN,IAAI;;;;;;;;;IAglB9B,oHAAoH;;cAElG,QAAQ,CAAC,qBAAqB,GAAG,yBAAyB,CAAC;;4BAEvD,qBAAqB,GAAG,yBAAyB,KAAG,OAAO;;IAOjF,0FAA0F;;;;;;IAM1F;;OAEG;;cAEe,QAAQ,CAAC,mBAAmB,CAAC;;yBAE5B,mBAAmB;;IAEtC;;;;;;;OAOG;;;;;;IAMH,iFAAiF;;;;;;IAMjF,qEAAqE;;;;;;IAMrE,qEAAqE;;;;;;IAMrE,+DAA+D;;cAE7C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;IAG/C;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;IAKH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAUH,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -18,7 +18,7 @@ export declare enum SupportedEntityType {
|
|
|
18
18
|
Upstream = "upstream",
|
|
19
19
|
Target = "target",
|
|
20
20
|
Vault = "vault",
|
|
21
|
-
|
|
21
|
+
Partial = "partial",
|
|
22
22
|
BackendCluster = "backend_cluster",
|
|
23
23
|
VirtualCluster = "virtual_cluster",
|
|
24
24
|
Listener = "listener",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-base-config-card.d.ts","sourceRoot":"","sources":["../../../src/types/entity-base-config-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE/D;;;;GAIG;AACH,oBAAY,mBAAmB;IAC7B,aAAa,mBAAmB;IAChC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,cAAc,YAAY;IAC1B,GAAG,QAAQ;IACX,MAAM,QAAQ;IACd,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,
|
|
1
|
+
{"version":3,"file":"entity-base-config-card.d.ts","sourceRoot":"","sources":["../../../src/types/entity-base-config-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE/D;;;;GAIG;AACH,oBAAY,mBAAmB;IAC7B,aAAa,mBAAmB;IAChC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,cAAc,YAAY;IAC1B,GAAG,QAAQ;IACX,MAAM,QAAQ;IACd,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;IAClC,QAAQ,aAAa;IACrB,MAAM,WAAW;IAIjB,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,yBAAyB,uBAAqC,CAAA;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,+BAA+B;AAC/B,MAAM,WAAW,uBAAwB,SAAQ,aAAa,EAAE,gBAAgB;CAAI;AAEpF,oCAAoC;AACpC,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB,EAAE,gBAAgB;CAAI;AAE5F,oBAAY,uBAAuB;IACjC,EAAE,OAAO;IACT,OAAO,aAAa;IACpB,IAAI,eAAe,CAAE,UAAU;IAC/B,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,QAAQ,cAAc;IACtB,SAAS,eAAe;IACxB,WAAW,iBAAiB;IAC5B,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;CAC/B;AAED,oBAAY,0BAA0B;IACpC,KAAK,UAAU;IACf,QAAQ,aAAa,CAAE,UAAU;IACjC,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,uBAAuB;IAEtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,IAAI,CAAC,EAAE,uBAAuB,CAAA;IAE9B,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,OAAO,CAAC,EAAE,0BAA0B,CAAA;IAEpC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAAA;CACvC;AAED,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC;CAAI;AAEnG,MAAM,WAAW,yBAAyB;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,6BAA6B,CAAA;CAC7C;AAED,MAAM,WAAW,UAAW,SAAQ,uBAAuB;IACzD,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,GAAG,CAAA;CACX;AAED,MAAM,WAAW,sCAAsC;IACrD,EAAE,EAAE,uBAAuB,CAAA;IAC3B,IAAI,EAAE,uBAAuB,CAAA;IAC7B,OAAO,EAAE,uBAAuB,CAAA;IAChC,UAAU,EAAE,uBAAuB,CAAA;IACnC,UAAU,EAAE,uBAAuB,CAAA;IACnC,IAAI,EAAE,uBAAuB,CAAA;IAC7B,QAAQ,EAAE,uBAAuB,CAAA;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B"}
|