@kong-ui-public/entities-gateway-services 3.11.32 → 3.11.34-pr.2198.4eddb2429.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/entities-gateway-services.es.js +690 -1326
- package/dist/entities-gateway-services.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/GatewayServiceConfigCard.vue.d.ts +2 -2
- package/dist/types/components/GatewayServiceForm.vue.d.ts +2 -2
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/gateway-service-form.d.ts +0 -8
- package/dist/types/types/gateway-service-form.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/types/components/LegacyGatewayServiceForm.vue.d.ts +0 -86
- package/dist/types/components/LegacyGatewayServiceForm.vue.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(R,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(R=typeof globalThis<"u"?globalThis:R||self,e(R["kong-ui-public-entities-gateway-services"]={},R.Vue,R.VueRouter,R.KongIcons,R["kong-ui-public-i18n"],R["kong-ui-public-entities-shared"]))})(this,function(R,e,ke,he,Ne,y){"use strict";const Ee={actions:{create:"New gateway service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New gateway service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},empty_state_v2:{create:"New gateway service",title:"Configure your first gateway service",group:"Services created in gateways within this group will automatically appear here.",description:"Gateway services represent backend APIs or microservices that receive traffic routed through the gateway."},form:{buttons:{try_sample:"Try sample API"},errors:{host:{empty:"Host cannot be empty",invalid:"Invalid host"},port:{type:"Port must be a number",invalid:"Port must be between 0 and 65535"},path:{prefix:"Path must begin with /",invalid:"Path should not include characters outside of the reserved list of RFC 3986"},protocol:{empty:"Protocol cannot be empty",invalid:"Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"},url:{invalid:"The URL must follow a valid format. Example: https://api.kong-air.com/flights"}},sections:{general:{title:"General Information",description:"Provide a name and tags to help identify and manage this service."},keys:{title:"Service endpoint",description:"Define where this service should send requests.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, host, port and path",url:{label:"Full URL",description:"Define the service using a single, complete API URL for simple setup."},protocol:{label:"Protocol, host, port, and path",description:"Manually specify each component of the API’s URL for advanced configurations."},viewAdvancedFields:"View advanced fields"}},fields:{upstream_url:{label:"Full URL",placeholder:"e.g. https://api.kong-air.com/flights",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"e.g. api.kong-air.com",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"e.g. /sample",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",tooltip:"Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",collapse:"Add tags"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function xe(){const n=Ne.createI18n("en-us",Ee);return{i18n:n,i18nT:Ne.i18nTComponent(n)}}function Se(){return{getPortFromProtocol:(q,_)=>{const m=[80,443],a=Number(_);if((a||a===0)&&!m.includes(a))return a;switch(q){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Ie(){const{i18n:{t:n}}=Z.useI18n();return{validateHost:w=>{if(!w||w.trim()==="")return n("gateway_services.form.errors.host.empty");const T=/^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;return/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(w)||T.test(w)?"":n("gateway_services.form.errors.host.invalid")},validateProtocol:(w,T)=>!w||w.trim()===""?n("gateway_services.form.errors.protocol.empty"):(w=w.slice(0,-1),T.find(i=>{if(i.value===w)return i})===void 0?n("gateway_services.form.errors.protocol.invalid"):""),validatePath:w=>!w||w===""?"":w.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(w)?n("gateway_services.form.errors.path.invalid"):"":n("gateway_services.form.errors.path.prefix"),validatePort:w=>{if(w==null||w==="")return"";const T=typeof w=="string"?parseInt(w,10):w;return isNaN(T)?n("gateway_services.form.errors.port.type"):T<0||T>65535?n("gateway_services.form.errors.port.invalid"):""}}}const Z={useI18n:xe,usePortFromProtocol:Se,useUrlValidators:Ie},ve="/v2/control-planes/{controlPlaneId}/core-entities",Ve="/{workspace}",X={list:{konnect:{all:`${ve}/services`},kongManager:{all:`${Ve}/services`}},form:{konnect:{create:`${ve}/services`,validate:`${ve}/v1/schemas/json/service/validate`,edit:`${ve}/services/{id}`},kongManager:{create:`${Ve}/services`,validate:`${Ve}/schemas/services/validate`,edit:`${Ve}/services/{id}`}}},Pe="#00abd2",Be="24px",Te={class:"kong-ui-entities-gateway-services-list"},Fe={class:"button-row"},$e={class:"empty-state-icon-gateway"},Ue={key:1},Ae=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||!n.createRoute||!n.getViewRoute||!n.getEditRoute||n.app==="kongManager"&&!n.isExactMatch&&!n.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle:success"],setup(n,{emit:q}){var c;const _=q,m=n,{i18n:{t:a,formatUnixTimeStamp:w}}=Z.useI18n(),T=ke.useRouter(),{axiosInstance:W}=y.useAxios((c=m.config)==null?void 0:c.axiosRequestConfig),{hasRecords:i,handleStateChange:M}=y.useTableState(()=>A.value),E=e.computed(()=>i.value&&m.config.app==="konnect"),ye=e.computed(()=>!m.enableV2EmptyStates&&m.config.app==="konnect"),de=e.computed(()=>m.config.app!=="kongManager"||!!m.config.disableSorting),O={name:{label:a("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...m.config.showControlPlaneColumn?{control_plane:{label:a("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:a("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:a("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:a("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:a("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:a("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:a("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:a("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:a("gateway_services.list.table_headers.created_at"),sortable:!0}},fe={columnVisibility:{created_at:!1}},Y=O,x=e.computed(()=>{var p,V;let u=`${m.config.apiBaseUrl}${X.list[m.config.app].all}`;return m.config.app==="konnect"?u=u.replace(/{controlPlaneId}/gi,((p=m.config)==null?void 0:p.controlPlaneId)||""):m.config.app==="kongManager"&&(u=u.replace(/\/{workspace}/gi,(V=m.config)!=null&&V.workspace?`/${m.config.workspace}`:"")),u}),ie=e.computed(()=>m.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${x.value}`):new URL(x.value)),A=e.ref(""),_e=e.computed(()=>{const u=m.config.app==="konnect"||m.config.isExactMatch;if(u)return{isExactMatch:u,placeholder:a(`search.placeholder.${m.config.app}`)};const{name:p,enabled:V,protocol:B,host:re,port:$,path:le}=O;return{isExactMatch:u,fields:{name:p,enabled:V,protocol:B,host:re,port:$,path:le},schema:m.config.filterSchema}}),{fetcher:r,fetcherState:h,fetcherCacheKey:J}=y.useFetcher(e.computed(()=>({...m.config,cacheIdentifier:m.cacheIdentifier})),x),se=()=>{A.value=""},pe=()=>{J.value++},t=e.ref(null),N=e.computed(()=>({ctaPath:m.config.createRoute,ctaText:S.value?m.isServerless?a("actions.serverless_create"):a("actions.create"):void 0,message:`${a("gateway_services.list.empty_state.description")}${m.config.additionMessageForEmptyState?` ${m.config.additionMessageForEmptyState}`:""}`,title:S.value?m.isServerless?a("gateway_services.list.empty_state.serverless_title"):a("gateway_services.list.empty_state.title"):a("gateway_services.title")})),ee=e.ref(!1),F=e.ref(null),Q=e.computed(()=>{const u={action:"disable",id:"",name:""};if(F.value){const{enabled:p,id:V,name:B}=F.value;u.action=p?"disable":"enable",u.id=V,u.name=B||V}return u}),be=u=>{ee.value=!0,F.value=u},H=()=>{ee.value=!1,F.value=null},me=async()=>{var B,re;if(!await((B=m.canEdit)==null?void 0:B.call(m,F.value))||!F.value)return;const p=`${ie.value.href}/${F.value.id}`,V=!F.value.enabled;try{const{data:$}=((re=m.config)==null?void 0:re.app)==="konnect"?await W.put(p,{...F.value,enabled:V}):await W.patch(p,{...F.value,enabled:V});_("toggle:success",$),F.value.enabled=V}catch($){_("error",$)}},ue=u=>{m.config.getControlPlaneRoute&&T.push(m.config.getControlPlaneRoute(u))},te=async(u,p)=>{const V=u.id;if(!await p(V)){_("copy:error",{entity:u,field:"id",message:a("errors.copy")});return}_("copy:success",{entity:u,field:"id",message:a("copy.success",{val:V})})},ae=async(u,p)=>{const V=JSON.stringify(u);if(!await p(V)){_("copy:error",{entity:u,message:a("errors.copy")});return}_("copy:success",{entity:u,message:a("copy.success_brief")})},ne=async u=>{var V;await((V=m.canRetrieve)==null?void 0:V.call(m,u))&&T.push(m.config.getViewRoute(u.id))},we=u=>({label:a("actions.view"),to:m.config.getViewRoute(u)}),j=u=>({label:a("actions.edit"),to:m.config.getEditRoute(u)}),D=e.ref(void 0),K=e.ref(!1),z=e.ref(!1),oe=e.ref(""),l=y.useDeleteUrlBuilder(m.config,x.value),f=u=>{D.value=u,K.value=!0,oe.value=""},v=()=>{K.value=!1,D.value=void 0},L=async()=>{var u,p,V;if((u=D.value)!=null&&u.id){z.value=!0;try{await W.delete(l(D.value.id)),_("delete:success",D.value),v(),J.value++}catch(B){oe.value=((V=(p=B.response)==null?void 0:p.data)==null?void 0:V.message)||B.message||a("errors.delete"),_("error",B)}finally{z.value=!1}}},P=()=>{T.push(m.config.createRoute)};e.watch(h,u=>{var p,V,B;if(u.status===y.FetcherStatus.Error){t.value={title:a("errors.general")},(B=(V=(p=u.error)==null?void 0:p.response)==null?void 0:V.data)!=null&&B.message&&(t.value.message=u.error.response.data.message),_("error",u.error);return}t.value=null});const S=e.ref(!1);return e.onBeforeMount(async()=>{S.value=await m.canCreate()}),(u,p)=>{const V=e.resolveComponent("KButton"),B=e.resolveComponent("KBadge"),re=e.resolveComponent("KInputSwitch"),$=e.resolveComponent("KDropdownItem"),le=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(e.unref(y.EntityBaseTable),{"cache-identifier":n.cacheIdentifier,"default-table-preferences":fe,"disable-sorting":de.value,"empty-state-options":N.value,"enable-entity-actions":"","error-message":t.value,fetcher:e.unref(r),"fetcher-cache-key":e.unref(J),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:A.value,"table-headers":e.unref(Y),onClearSearchInput:se,"onClick:row":p[5]||(p[5]=b=>ne(b)),onSort:pe,onState:e.unref(M)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(y.EntityFilter),{modelValue:A.value,"onUpdate:modelValue":p[0]||(p[0]=b=>A.value=b),config:_e.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Fe,[E.value?(e.openBlock(),e.createBlock(V,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:p[1]||(p[1]=b=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(he.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canCreate()},{default:e.withCtx(()=>[e.createVNode(V,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:n.useActionOutside?"medium":"large",to:n.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(he.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:b})=>[e.createElementVNode("b",null,e.toDisplayString(b??"-"),1)]),control_plane:e.withCtx(({row:b})=>{var o;return[(o=b.x_meta)!=null&&o.cluster_id?(e.openBlock(),e.createBlock(B,{key:0,tooltip:b.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(s=>ue(b.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",Ue,"-"))]}),enabled:e.withCtx(({row:b})=>[e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canEdit(b),"force-show":""},{default:e.withCtx(({isAllowed:o})=>[e.createElementVNode("div",{onClick:p[4]||(p[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(re,{modelValue:b.enabled,"onUpdate:modelValue":s=>b.enabled=s,"data-testid":`row-${b.id}-toggle-input`,disabled:!o,onClick:e.withModifiers(s=>be(b),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:b})=>[e.createVNode(e.unref(y.TableTags),{tags:b},null,8,["tags"])]),created_at:e.withCtx(({rowValue:b})=>[e.createTextVNode(e.toDisplayString(e.unref(w)(b)),1)]),updated_at:e.withCtx(({row:b,rowValue:o})=>[e.createTextVNode(e.toDisplayString(e.unref(w)(o??b.created_at)),1)]),actions:e.withCtx(({row:b})=>[e.createVNode(le,null,{default:e.withCtx(({copyToClipboard:o})=>[e.createVNode($,{"data-testid":"action-entity-copy-id",onClick:s=>te(b,o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(le,null,{default:e.withCtx(({copyToClipboard:o})=>[e.createVNode($,{"data-testid":"action-entity-copy-json",onClick:s=>ae(b,o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canRetrieve(b)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-view","has-divider":"",item:we(b.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canEdit(b)},{default:e.withCtx(()=>[e.createVNode($,{"data-testid":"action-entity-edit",item:j(b.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(y.PermissionsWrapper),{"auth-function":()=>n.canDelete(b)},{default:e.withCtx(()=>[e.createVNode($,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:o=>f(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(i)&&ye.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!n.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(V,{appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-more-button",icon:"",onClick:p[2]||(p[2]=b=>u.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(he.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!A.value&&n.enableV2EmptyStates&&n.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var b;return[e.createVNode(e.unref(y.EntityEmptyState),{"action-button-text":e.unref(a)("gateway_services.empty_state_v2.create"),appearance:"secondary","can-create":()=>n.canCreate(),"data-testid":"gateway-services-entity-empty-state",description:e.unref(a)("gateway_services.empty_state_v2.description"),"learn-more":n.config.app==="konnect",title:e.unref(a)("gateway_services.empty_state_v2.title"),"onClick:create":P,"onClick:learnMore":p[3]||(p[3]=o=>u.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",$e,[e.createVNode(e.unref(he.ServicesIcon),{color:e.unref(Pe),size:e.unref(Be)},null,8,["color","size"])])]),_:2},[(b=n.config)!=null&&b.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(y.EntityToggleModal),{action:Q.value.action,"entity-id":Q.value.id,"entity-name":Q.value.name,"entity-type":e.unref(a)("glossary.gateway_services"),"on-confirm":me,visible:ee.value,onCancel:H,onProceed:H},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(y.EntityDeleteModal),{"action-pending":z.value,description:e.unref(a)("actions.delete.description"),"entity-name":D.value&&(D.value.name||D.value.id),"entity-type":e.unref(y.EntityTypes).GatewayService,error:oe.value,title:e.unref(a)("actions.delete.title"),visible:K.value,onCancel:v,onProceed:L},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Ce=(n,q)=>{const _=n.__vccOpts||n;for(const[m,a]of q)_[m]=a;return _},Re=Ce(Ae,[["__scopeId","data-v-210f19c5"]]),Me={class:"kong-ui-entities-gateway-service-form"},De={key:0},Ke={class:"gateway-service-form-traffic-label"},Le={class:"gateway-service-form-margin-bottom"},We={key:0,class:"gateway-service-form-group-fields"},qe={key:1,class:"gateway-service-form-group-fields"},Ge={key:0},Oe={class:"gateway-service-form-margin-top"},je={class:"gateway-service-form-margin-bottom"},ze={class:"gateway-service-form-margin-bottom"},He={class:"gateway-service-form-margin-bottom"},Ze={class:"gateway-service-form-margin-bottom"},Je={key:0,class:"gateway-service-form-margin-bottom"},Qe={key:1,class:"gateway-service-form-margin-bottom"},Xe={key:2,class:"gateway-service-form-margin-bottom"},Ye={key:0,class:"checkbox-aligned-radio"},et={key:1,class:"checkbox-aligned-radio"},tt=Ce(e.defineComponent({__name:"LegacyGatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated"],setup(n,{expose:q,emit:_}){var oe;const m=_,a=n,w=e.ref(!0),T=ke.useRouter(),{i18nT:W,i18n:{t:i}}=Z.useI18n(),{getMessageFromError:M}=y.useErrors(),{axiosInstance:E}=y.useAxios((oe=a.config)==null?void 0:oe.axiosRequestConfig),ye=y.useValidators(),de=e.computed(()=>X.form[a.config.app].edit),O=e.computed(()=>a.gatewayServiceId?y.EntityBaseFormType.Edit:y.EntityBaseFormType.Create),fe=e.ref(!1),Y=e.computed(()=>!!a.gatewayServiceId),x=e.ref(Y.value?"protocol":"url"),ie=Z.usePortFromProtocol(),A=e.ref(""),_e=e.computed(()=>!!A.value),r=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0},isReadonly:!1,errorMessage:""}),h=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0}),J=a.config.app==="konnect"||y.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),se=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...J?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],pe={url:"url",protocol:"protocol"},t=(l,f)=>{f.value},N=l=>l?parseFloat(l):0,ee=()=>{w.value=!0,r.errorMessage="",r.fields.host=h.host,r.fields.path=h.path,r.fields.port=h.port,r.fields.protocol=h.protocol,r.fields.url=h.url,r.fields.retries=h.retries,r.fields.connect_timeout=h.connect_timeout,r.fields.write_timeout=h.write_timeout,r.fields.read_timeout=h.read_timeout,r.fields.client_certificate=h.client_certificate,r.fields.ca_certificates=h.ca_certificates,r.fields.tls_verify_enabled=h.tls_verify_enabled,r.fields.tls_verify_value=h.tls_verify_value,r.fields.enabled=h.enabled},F=()=>{if(r.fields.url&&x.value==="url")try{const l=new URL(r.fields.url);r.errorMessage="",r.fields.protocol=l.protocol.slice(0,-1),r.fields.host=l.hostname,r.fields.path=l.pathname;const f=Number(l.port);fe.value=!!f,r.fields.port=f||ie.getPortFromProtocol(r.fields.protocol),r.errorMessage="",m("url-valid:success")}catch(l){r.errorMessage=i("errors.urlErrorMessage"),m("url-valid:error",M(l))}else m("url-valid:success"),r.errorMessage=""},Q=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(r.fields.protocol)),be=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),H=e.computed(()=>{if(x.value==="url")return!0;const l=["https","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),me=e.computed(()=>{if(x.value==="url")return!0;const l=["https","wss","tls"].includes(r.fields.protocol);return x.value==="protocol"&&l}),ue=l=>{A.value=ye.utf8Name(l)},te=e.computed(()=>Y.value&&JSON.stringify(r.fields)!==JSON.stringify(h)||x.value==="url"&&!!r.fields.url||x.value==="protocol"&&!!r.fields.host),ae=l=>{var f,v,L;r.fields.name=(l==null?void 0:l.name)||"",r.fields.tags=((f=l==null?void 0:l.tags)==null?void 0:f.join(", "))||"",r.fields.protocol=(l==null?void 0:l.protocol)||"http",r.fields.path=(l==null?void 0:l.path)||"",r.fields.read_timeout=l!=null&&l.read_timeout||(l==null?void 0:l.read_timeout)===0?l==null?void 0:l.read_timeout:6e4,r.fields.retries=l!=null&&l.retries||(l==null?void 0:l.retries)===0?l==null?void 0:l.retries:5,r.fields.host=(l==null?void 0:l.host)||"",r.fields.connect_timeout=l!=null&&l.connect_timeout||(l==null?void 0:l.connect_timeout)===0?l==null?void 0:l.connect_timeout:6e4,r.fields.tls_verify_enabled=(l==null?void 0:l.tls_verify)!==""&&(l==null?void 0:l.tls_verify)!==null&&(l==null?void 0:l.tls_verify)!==void 0,r.fields.tls_verify_value=l!=null&&l.tls_verify?l==null?void 0:l.tls_verify:!1,r.fields.ca_certificates=((v=l==null?void 0:l.ca_certificates)==null?void 0:v.join(","))||"",r.fields.client_certificate=((L=l==null?void 0:l.client_certificate)==null?void 0:L.id)||"",r.fields.write_timeout=l!=null&&l.write_timeout||(l==null?void 0:l.write_timeout)===0?l==null?void 0:l.write_timeout:6e4,r.fields.port=l!=null&&l.port||(l==null?void 0:l.port)===0?l==null?void 0:l.port:80,r.fields.enabled=(l==null?void 0:l.enabled)??!0,Object.assign(h,r.fields)},ne=()=>{T.push(a.config.cancelRoute)},we=e.computed(()=>{var f,v;let l=`${a.config.apiBaseUrl}${X.form[a.config.app].validate}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((f=a.config)==null?void 0:f.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),j=e.computed(()=>{var f,v;let l=`${a.config.apiBaseUrl}${X.form[a.config.app][O.value]}`;return a.config.app==="konnect"?l=l.replace(/{controlPlaneId}/gi,((f=a.config)==null?void 0:f.controlPlaneId)||""):a.config.app==="kongManager"&&(l=l.replace(/\/{workspace}/gi,(v=a.config)!=null&&v.workspace?`/${a.config.workspace}`:"")),l=l.replace(/{id}/gi,a.gatewayServiceId),l}),D=l=>{let f="";l.url&&(f=new URL(l.url).protocol),(["https","wss","tls"].includes(l.protocol)||["https","wss","tls"].includes(f))&&(l.tls_verify=l.tls_verify_enabled?l.tls_verify_value:null),delete l.tls_verify_enabled,delete l.tls_verify_value},K=e.computed(()=>{var f,v,L,P;const l={name:r.fields.name||null,tags:r.fields.tags?(L=(v=(f=r.fields.tags)==null?void 0:f.split(","))==null?void 0:v.map(S=>String(S||"").trim()))==null?void 0:L.filter(S=>S!==""):null,protocol:r.fields.protocol,path:r.fields.path||null,read_timeout:r.fields.read_timeout,retries:r.fields.retries,host:r.fields.host,connect_timeout:r.fields.connect_timeout,tls_verify_value:r.fields.tls_verify_value,tls_verify_enabled:r.fields.tls_verify_enabled,ca_certificates:r.fields.ca_certificates?(P=r.fields.ca_certificates)==null?void 0:P.split(",").filter(S=>S!==""):null,client_certificate:r.fields.client_certificate?{id:r.fields.client_certificate}:null,write_timeout:r.fields.write_timeout,port:r.fields.port,url:r.fields.url,enabled:r.fields.enabled};return r.fields.client_certificate&&["https","wss","tls"].includes(r.fields.protocol)&&(l.client_certificate={id:r.fields.client_certificate}),r.fields.tls_verify_enabled&&["https","wss","tls"].includes(r.fields.protocol)&&(l.tls_verify=r.fields.tls_verify_value),Q.value||(l.path=null),O.value==="create"?x.value==="url"?(delete l.protocol,delete l.host,delete l.path,a.config.app==="konnect"&&delete l.port):delete l.url:O.value==="edit"&&delete l.url,l}),z=async()=>{var l,f,v,L;try{r.isReadonly=!0,F();const P=K.value;D(P);let S;if(await E.post(we.value,P),O.value==="create"?S=await E.post(j.value,P):O.value==="edit"&&(S=((l=a.config)==null?void 0:l.app)==="konnect"?await E.put(j.value,P):await E.patch(j.value,P)),S){const{data:c}=S;r.fields.name=(c==null?void 0:c.name)||"",r.fields.port=c.port||ie.getPortFromProtocol(c.protocol),r.fields.protocol=(c==null?void 0:c.protocol)||"http",r.fields.host=(c==null?void 0:c.host)||"",r.fields.path=(c==null?void 0:c.path)||"",r.fields.url=(c==null?void 0:c.url)||"",r.fields.retries=c!=null&&c.retries||(c==null?void 0:c.retries)===0?c==null?void 0:c.retries:5,r.fields.connect_timeout=c!=null&&c.connect_timeout||(c==null?void 0:c.connect_timeout)===0?c==null?void 0:c.connect_timeout:6e4,r.fields.write_timeout=c!=null&&c.write_timeout||(c==null?void 0:c.write_timeout)===0?c==null?void 0:c.write_timeout:6e4,r.fields.read_timeout=c!=null&&c.read_timeout||(c==null?void 0:c.read_timeout)===0?c==null?void 0:c.read_timeout:6e4,r.fields.client_certificate=((f=c==null?void 0:c.client_certificate)==null?void 0:f.id)||"",r.fields.ca_certificates=(v=c==null?void 0:c.ca_certificates)!=null&&v.length?c==null?void 0:c.ca_certificates.join(","):"",r.fields.tls_verify_enabled=(c==null?void 0:c.tls_verify)!==""&&(c==null?void 0:c.tls_verify)!==null&&(c==null?void 0:c.tls_verify)!==void 0,r.fields.tls_verify_value=r.fields.tls_verify_enabled&&(c==null?void 0:c.tls_verify),r.fields.tags=(L=c==null?void 0:c.tags)!=null&&L.length?c.tags.join(", "):"",r.fields.enabled=(c==null?void 0:c.enabled)??!0,Object.assign(h,r.fields),m("update",S==null?void 0:S.data)}return S}catch(P){r.errorMessage=M(P),m("error",P)}finally{r.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(r.fields,h)}),e.watch(r.fields,l=>{r.fields.port=ie.getPortFromProtocol(l.protocol,String(l.port)),m("model-updated",K.value)}),e.onMounted(()=>{m("model-updated",K.value)}),q({validateUrl:F,getPayload:K,saveFormData:z,canSubmit:te,initForm:ae}),(l,f)=>{const v=e.resolveComponent("KInput"),L=e.resolveComponent("KLabel"),P=e.resolveComponent("KRadio"),S=e.resolveComponent("KSelect"),c=e.resolveComponent("KCheckbox"),u=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(e.unref(y.EntityBaseForm),{"can-submit":te.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(y.SupportedEntityType).GatewayService,"error-message":r.errorMessage,"fetch-url":de.value,"form-fields":K.value,"is-readonly":r.isReadonly,onCancel:ne,"onFetch:error":f[25]||(f[25]=p=>l.$emit("error",p)),"onFetch:success":ae,onLoading:f[26]||(f[26]=p=>l.$emit("loading",p)),onSubmit:z},{"form-actions":e.withCtx(()=>[e.renderSlot(l.$slots,"form-actions",{canSubmit:te.value,cancel:ne,submit:z},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(v,{modelValue:r.fields.name,"onUpdate:modelValue":f[0]||(f[0]=p=>r.fields.name=p),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:_e.value,"error-message":A.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:r.isReadonly,type:"text",onInput:ue},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(v,{modelValue:r.fields.tags,"onUpdate:modelValue":f[1]||(f[1]=p=>r.fields.tags=p),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[Y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",De,[e.createElementVNode("div",Ke,[e.createVNode(L,{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupLabel")),1)]),_:1})]),e.createElementVNode("div",Le,[e.createVNode(P,{modelValue:x.value,"onUpdate:modelValue":f[2]||(f[2]=p=>x.value=p),"data-testid":"gateway-service-url-radio","selected-value":pe.url,onChange:ee},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.urlLabel")),1)]),_:1},8,["modelValue","selected-value"])]),x.value==="url"?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(v,{modelValue:r.fields.url,"onUpdate:modelValue":f[3]||(f[3]=p=>r.fields.url=p),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(P,{modelValue:x.value,"onUpdate:modelValue":f[4]||(f[4]=p=>x.value=p),"checked-group":"protocol","data-testid":"gateway-service-protocol-radio","selected-value":pe.protocol,onChange:ee},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.sections.keys.checkedGroupAltLabel")),1)]),_:1},8,["modelValue","selected-value"])])),x.value==="protocol"||Y.value?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(S,{modelValue:r.fields.protocol,"onUpdate:modelValue":f[5]||(f[5]=p=>r.fields.protocol=p),"data-testid":"gateway-service-protocol-select",items:se,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:r.isReadonly,required:"",width:"100%",onSelected:f[6]||(f[6]=p=>t(r.fields.protocol,p))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(v,{modelValue:r.fields.host,"onUpdate:modelValue":f[7]||(f[7]=p=>r.fields.host=p),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:""},null,8,["modelValue","label","label-attributes","placeholder"]),Q.value?(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(v,{modelValue:r.fields.path,"onUpdate:modelValue":f[8]||(f[8]=p=>r.fields.path=p),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder")},null,8,["modelValue","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(v,{modelValue:r.fields.port,"onUpdate:modelValue":[f[9]||(f[9]=p=>r.fields.port=p),f[10]||(f[10]=()=>{r.fields.port=N(r.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number"},null,8,["modelValue","label","label-attributes"])])):e.createCommentVNode("",!0),e.createVNode(u,{modelValue:w.value,"onUpdate:modelValue":f[24]||(f[24]=p=>w.value=p),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createElementVNode("div",Oe,[e.createElementVNode("div",je,[e.createVNode(v,{modelValue:r.fields.retries,"onUpdate:modelValue":[f[11]||(f[11]=p=>r.fields.retries=p),f[12]||(f[12]=()=>{r.fields.retries=N(r.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",ze,[e.createVNode(v,{modelValue:r.fields.connect_timeout,"onUpdate:modelValue":[f[13]||(f[13]=p=>r.fields.connect_timeout=p),f[14]||(f[14]=()=>{r.fields.connect_timeout=N(r.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",He,[e.createVNode(v,{modelValue:r.fields.write_timeout,"onUpdate:modelValue":[f[15]||(f[15]=p=>r.fields.write_timeout=p),f[16]||(f[16]=()=>{r.fields.write_timeout=N(r.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ze,[e.createVNode(v,{modelValue:r.fields.read_timeout,"onUpdate:modelValue":[f[17]||(f[17]=p=>r.fields.read_timeout=p),f[18]||(f[18]=()=>{r.fields.read_timeout=N(r.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:r.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),be.value?(e.openBlock(),e.createElementBlock("div",Je,[e.createVNode(v,{modelValue:r.fields.client_certificate,"onUpdate:modelValue":f[19]||(f[19]=p=>r.fields.client_certificate=p),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:r.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(v,{modelValue:r.fields.ca_certificates,"onUpdate:modelValue":f[20]||(f[20]=p=>r.fields.ca_certificates=p),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:r.isReadonly,type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(W),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"])])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(c,{modelValue:r.fields.tls_verify_enabled,"onUpdate:modelValue":f[21]||(f[21]=p=>r.fields.tls_verify_enabled=p),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(W),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(P,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":f[22]||(f[22]=p=>r.fields.tls_verify_value=p),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),r.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(P,{modelValue:r.fields.tls_verify_value,"onUpdate:modelValue":f[23]||(f[23]=p=>r.fields.tls_verify_value=p),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"])]),_:3},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-e874c296"]]),ot={class:"kong-ui-gateway-service-entity-config-card"},rt=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(n){const q=n,{i18n:{t:_},i18nT:m}=Z.useI18n(),a=e.computed(()=>X.form[q.config.app].edit),{getPropValue:w}=y.useHelpers(),T=(i,M)=>w(i,M)===!0?_("gateway_services.form.fields.tls_verify_option.true.display"):_("gateway_services.form.fields.tls_verify_option.false.display"),W=e.ref({id:{},name:{tooltip:_("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:y.ConfigurationSchemaSection.Basic,tooltip:_("gateway_services.form.fields.protocol.tooltip")},host:{section:y.ConfigurationSchemaSection.Basic,tooltip:_("gateway_services.form.fields.host.tooltip")},path:{section:y.ConfigurationSchemaSection.Basic,tooltip:_("gateway_services.form.fields.path.tooltip")},port:{section:y.ConfigurationSchemaSection.Basic,tooltip:_("gateway_services.form.fields.port.tooltip")},tags:{tooltip:_("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:_("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:_("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:_("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:_("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:_("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:y.ConfigurationSchemaType.BadgeTag,label:_("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:_("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(i,M)=>(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(e.unref(y.EntityBaseConfigCard),{config:n.config,"config-card-doc":n.configCardDoc,"config-schema":W.value,"entity-type":e.unref(y.SupportedEntityType).GatewayService,"fetch-url":a.value,"hide-title":n.hideTitle,"onFetch:error":M[0]||(M[0]=E=>i.$emit("fetch:error",E)),"onFetch:success":M[1]||(M[1]=E=>i.$emit("fetch:success",E)),onLoading:M[2]||(M[2]=E=>i.$emit("loading",E))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(m),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(_)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(_)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(m),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(_)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(_)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(m),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(_)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(E=>[e.createTextVNode(e.toDisplayString(typeof e.unref(w)("rowValue",E)=="boolean"?T("rowValue",E):e.unref(_)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(E=>[e.createTextVNode(e.toDisplayString(e.unref(w)("rowValue",E)?e.unref(w)("rowValue",E).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),G={name:"Kong-Air-Flights-API",tags:[],protocol:"https",path:"/flights",read_timeout:6e4,retries:5,host:"api.kong-air.com",connect_timeout:6e4,ca_certificates:null,client_certificate:null,write_timeout:6e4,port:443},lt={class:"kong-ui-entities-gateway-service-form"},it={key:0,class:"gateway-service-form-general-info"},st={class:"gateway-service-form-group-selection-wrapper"},at={key:0,class:"gateway-service-form-group-fields"},nt={key:0,class:"gateway-service-form-group-fields"},ct={key:0},dt={key:0,class:"gateway-service-form-advanced-fields"},ft={class:"gateway-service-form-margin-bottom"},pt={class:"gateway-service-form-margin-bottom"},mt={class:"gateway-service-form-margin-bottom"},ut={class:"gateway-service-form-margin-bottom"},gt={key:0,class:"gateway-service-form-margin-bottom"},yt={key:1,class:"gateway-service-form-margin-bottom"},_t={key:2,class:"gateway-service-form-margin-bottom"},bt={key:0,class:"checkbox-aligned-radio"},wt={key:1,class:"checkbox-aligned-radio"},ht={class:"gateway-service-form-tags"},vt={class:"form-error-list"},Vt=Ce(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string"||!n.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1},hideTrySampleApiButton:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated","try-sample-api"],setup(n,{expose:q,emit:_}){var b;const m=_,a=n,w=e.ref(!0),T=ke.useRouter(),{i18nT:W,i18n:{t:i}}=Z.useI18n(),{getErrorFieldsFromError:M}=y.useErrors(),{axiosInstance:E}=y.useAxios((b=a.config)==null?void 0:b.axiosRequestConfig),ye=y.useValidators(),{validateHost:de,validatePath:O,validatePort:fe,validateProtocol:Y}=Z.useUrlValidators(),{objectsAreEqual:x}=y.useHelpers(),ie=e.computed(()=>X.form[a.config.app].edit),A=e.computed(()=>a.gatewayServiceId?y.EntityBaseFormType.Edit:y.EntityBaseFormType.Create),_e=e.ref(!1),r=e.computed(()=>!!a.gatewayServiceId),h=e.ref(r.value?"protocol":"url"),J=Z.usePortFromProtocol(),se=e.ref(""),pe=e.computed(()=>!!se.value||!!j("name")),t=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0},isReadonly:!1,errorMessages:[],formFieldErrors:{host:"",port:"",path:"",name:"",url:"",tags:"",retries:"",connect_timeout:"",write_timeout:"",read_timeout:"",client_certificate:"",ca_certificates:"",tls_verify_enabled:"",tls_verify_value:""}}),N=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0}),ee=a.config.app==="konnect"||y.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),F=[{label:i("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:i("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:i("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:i("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:i("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...ee?[{label:i("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:i("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:i("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],Q={url:"url",protocol:"protocol"},be=(o,s)=>{s.value},H=o=>o?parseFloat(o):0,me=()=>{t.fields.host=N.host,t.fields.path=N.path,t.fields.port=N.port,t.fields.protocol=N.protocol,t.fields.url=N.url,t.fields.retries=N.retries,t.fields.connect_timeout=N.connect_timeout,t.fields.write_timeout=N.write_timeout,t.fields.read_timeout=N.read_timeout,t.fields.client_certificate=N.client_certificate,t.fields.ca_certificates=N.ca_certificates,t.fields.tls_verify_enabled=N.tls_verify_enabled,t.fields.tls_verify_value=N.tls_verify_value,t.fields.enabled=N.enabled},ue=()=>{w.value=!0,K(),t.errorMessages=[],me()},te=()=>{switch(me(),t.fields.name=`${G.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,h.value){case"url":t.fields.url=`${G.protocol}://${G.host}${G.path}`;break;case"protocol":t.fields.host=G.host,t.fields.path=G.path,t.fields.protocol=G.protocol,t.fields.port=G.port;break;default:t.fields.url=`${G.protocol}://${G.host}${G.path}`}},ae=()=>{if(K(),t.fields.url.length)try{const o=new URL(t.fields.url),s=Y(o.protocol,F);if(s)throw new Error(s);t.fields.protocol=o.protocol.slice(0,-1);const k=de(o.hostname);if(k)throw new Error(k);t.fields.host=o.hostname;const U=O(o.pathname);if(U)throw new Error(U);t.fields.path=o.pathname;const C=fe(o.port);if(C)throw new Error(C);const I=Number(o.port);_e.value=!!I,t.fields.port=I||J.getPortFromProtocol(t.fields.protocol),m("url-valid:success")}catch{m("url-valid:error",i("gateway_services.form.errors.url.invalid")),t.formFieldErrors.url=i("gateway_services.form.errors.url.invalid")}},ne=o=>{K(o)},we=e.computed(()=>!!t.formFieldErrors.url||!!t.formFieldErrors.host||!!t.formFieldErrors.port),j=o=>{if(t.errorMessages.length)return"";const s=t.formFieldErrors;return s[o]?s[o]:""},D=o=>{K(o??void 0);const s=de(t.fields.host);s&&(t.formFieldErrors.host=s);const k=O(t.fields.path);k&&(t.formFieldErrors.path=k);const U=fe(t.fields.port);U&&(t.formFieldErrors.port=U),z.value?m("url-valid:success"):m("url-valid:error",t.errorMessages.join(",")||i("gateway_services.form.errors.url.invalid"))},K=o=>{if(o)t.formFieldErrors[o]="";else for(let s in t.formFieldErrors)t.formFieldErrors[s]="";t.errorMessages=[]},z=e.computed(()=>{for(let o in t.formFieldErrors)if(t.formFieldErrors[o].length)return!1;return!0}),oe=()=>{t.fields.url&&h.value==="url"?ae():D()},l=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,f=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(t.fields.protocol)),v=e.computed(()=>{if(h.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return h.value==="protocol"&&o}),L=e.computed(()=>{if(h.value==="url")return!0;const o=["https","tls"].includes(t.fields.protocol);return h.value==="protocol"&&o}),P=e.computed(()=>{if(h.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return h.value==="protocol"&&o}),S=o=>{K("name"),se.value=ye.utf8Name(o)},c=e.computed(()=>{const o=!r.value||!x(t.fields,N),s=h.value==="url"&&!!t.fields.url&&z.value,k=h.value==="protocol"&&!!t.fields.host&&z.value;return o&&(s||k)}),u=o=>{var s,k,U;t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((s=o==null?void 0:o.tags)==null?void 0:s.join(", "))||"",t.fields.protocol=(o==null?void 0:o.protocol)||"http",t.fields.path=(o==null?void 0:o.path)||"",t.fields.read_timeout=o!=null&&o.read_timeout||(o==null?void 0:o.read_timeout)===0?o==null?void 0:o.read_timeout:6e4,t.fields.retries=o!=null&&o.retries||(o==null?void 0:o.retries)===0?o==null?void 0:o.retries:5,t.fields.host=(o==null?void 0:o.host)||"",t.fields.connect_timeout=o!=null&&o.connect_timeout||(o==null?void 0:o.connect_timeout)===0?o==null?void 0:o.connect_timeout:6e4,t.fields.tls_verify_enabled=(o==null?void 0:o.tls_verify)!==""&&(o==null?void 0:o.tls_verify)!==null&&(o==null?void 0:o.tls_verify)!==void 0,t.fields.tls_verify_value=o!=null&&o.tls_verify?o==null?void 0:o.tls_verify:!1,t.fields.ca_certificates=((k=o==null?void 0:o.ca_certificates)==null?void 0:k.join(","))||"",t.fields.client_certificate=((U=o==null?void 0:o.client_certificate)==null?void 0:U.id)||"",t.fields.write_timeout=o!=null&&o.write_timeout||(o==null?void 0:o.write_timeout)===0?o==null?void 0:o.write_timeout:6e4,t.fields.port=o!=null&&o.port||(o==null?void 0:o.port)===0?o==null?void 0:o.port:80,t.fields.enabled=(o==null?void 0:o.enabled)??!0,Object.assign(N,t.fields)},p=()=>{T.push(a.config.cancelRoute)},V=e.computed(()=>{var s,k;let o=`${a.config.apiBaseUrl}${X.form[a.config.app].validate}`;return a.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((s=a.config)==null?void 0:s.controlPlaneId)||""):a.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(k=a.config)!=null&&k.workspace?`/${a.config.workspace}`:"")),o=o.replace(/{id}/gi,a.gatewayServiceId),o}),B=e.computed(()=>{var s,k;let o=`${a.config.apiBaseUrl}${X.form[a.config.app][A.value]}`;return a.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((s=a.config)==null?void 0:s.controlPlaneId)||""):a.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(k=a.config)!=null&&k.workspace?`/${a.config.workspace}`:"")),o=o.replace(/{id}/gi,a.gatewayServiceId),o}),re=o=>{let s="";o.url&&(s=new URL(o.url).protocol),(["https","wss","tls"].includes(o.protocol)||["https","wss","tls"].includes(s))&&(o.tls_verify=o.tls_verify_enabled?o.tls_verify_value:null),delete o.tls_verify_enabled,delete o.tls_verify_value},$=e.computed(()=>{var s,k,U,C;const o={name:t.fields.name||null,tags:t.fields.tags?(U=(k=(s=t.fields.tags)==null?void 0:s.split(","))==null?void 0:k.map(I=>String(I||"").trim()))==null?void 0:U.filter(I=>I!==""):null,protocol:t.fields.protocol,path:t.fields.path||null,read_timeout:t.fields.read_timeout,retries:t.fields.retries,host:t.fields.host,connect_timeout:t.fields.connect_timeout,tls_verify_value:t.fields.tls_verify_value,tls_verify_enabled:t.fields.tls_verify_enabled,ca_certificates:t.fields.ca_certificates?(C=t.fields.ca_certificates)==null?void 0:C.split(",").filter(I=>I!==""):null,client_certificate:t.fields.client_certificate?{id:t.fields.client_certificate}:null,write_timeout:t.fields.write_timeout,port:t.fields.port,url:t.fields.url,enabled:t.fields.enabled};return t.fields.client_certificate&&["https","wss","tls"].includes(t.fields.protocol)&&(o.client_certificate={id:t.fields.client_certificate}),t.fields.tls_verify_enabled&&["https","wss","tls"].includes(t.fields.protocol)&&(o.tls_verify=t.fields.tls_verify_value),f.value||(o.path=null),A.value==="create"?h.value==="url"?(delete o.protocol,delete o.host,delete o.path,a.config.app==="konnect"&&delete o.port):delete o.url:A.value==="edit"&&delete o.url,o}),le=async()=>{var o,s,k,U;try{t.isReadonly=!0;const C=$.value;re(C);let I;if(await E.post(V.value,C),A.value==="create"?I=await E.post(B.value,C):A.value==="edit"&&(I=((o=a.config)==null?void 0:o.app)==="konnect"?await E.put(B.value,C):await E.patch(B.value,C)),I){const{data:d}=I;t.fields.name=(d==null?void 0:d.name)||"",t.fields.port=d.port||J.getPortFromProtocol(d.protocol),t.fields.protocol=(d==null?void 0:d.protocol)||"http",t.fields.host=(d==null?void 0:d.host)||"",t.fields.path=(d==null?void 0:d.path)||"",t.fields.url=(d==null?void 0:d.url)||"",t.fields.retries=d!=null&&d.retries||(d==null?void 0:d.retries)===0?d==null?void 0:d.retries:5,t.fields.connect_timeout=d!=null&&d.connect_timeout||(d==null?void 0:d.connect_timeout)===0?d==null?void 0:d.connect_timeout:6e4,t.fields.write_timeout=d!=null&&d.write_timeout||(d==null?void 0:d.write_timeout)===0?d==null?void 0:d.write_timeout:6e4,t.fields.read_timeout=d!=null&&d.read_timeout||(d==null?void 0:d.read_timeout)===0?d==null?void 0:d.read_timeout:6e4,t.fields.client_certificate=((s=d==null?void 0:d.client_certificate)==null?void 0:s.id)||"",t.fields.ca_certificates=(k=d==null?void 0:d.ca_certificates)!=null&&k.length?d==null?void 0:d.ca_certificates.join(","):"",t.fields.tls_verify_enabled=(d==null?void 0:d.tls_verify)!==""&&(d==null?void 0:d.tls_verify)!==null&&(d==null?void 0:d.tls_verify)!==void 0,t.fields.tls_verify_value=t.fields.tls_verify_enabled&&(d==null?void 0:d.tls_verify),t.fields.tags=(U=d==null?void 0:d.tags)!=null&&U.length?d.tags.join(", "):"",t.fields.enabled=(d==null?void 0:d.enabled)??!0,Object.assign(N,t.fields),m("update",I==null?void 0:I.data)}return I}catch(C){const{fields:I,messages:d}=M(C);t.errorMessages=d,I.length&&I.forEach(ce=>{const ge=ce.field;ge==="client_certificate.id"?t.formFieldErrors.client_certificate=ce.message:ge.startsWith("ca_certificates")?t.formFieldErrors.ca_certificates=ce.message:Object.keys(t.formFieldErrors).includes(ge)&&(t.formFieldErrors={...t.formFieldErrors,[ge]:ce.message})}),m("error",C)}finally{t.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(t.fields,N)}),e.watch(t.fields,o=>{t.fields.port=J.getPortFromProtocol(o.protocol,String(o.port)),m("model-updated",$.value)}),e.onMounted(()=>{m("model-updated",$.value),r.value||(t.fields.name=l())}),q({validateUrl:oe,getPayload:$,saveFormData:le,canSubmit:c,initForm:u}),(o,s)=>{const k=e.resolveComponent("KRadio"),U=e.resolveComponent("KButton"),C=e.resolveComponent("KInput"),I=e.resolveComponent("KSelect"),d=e.resolveComponent("KCheckbox"),ce=e.resolveComponent("KCollapse"),ge=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(e.unref(y.EntityBaseForm),{"can-submit":c.value,config:n.config,"edit-id":n.gatewayServiceId,"entity-type":e.unref(y.SupportedEntityType).GatewayService,"fetch-url":ie.value,"form-fields":$.value,"is-readonly":t.isReadonly,onCancel:p,"onFetch:error":s[30]||(s[30]=g=>o.$emit("error",g)),"onFetch:success":u,onLoading:s[31]||(s[31]=g=>o.$emit("loading",g)),onSubmit:le},{"form-actions":e.withCtx(()=>[e.renderSlot(o.$slots,"form-actions",{canSubmit:c.value,cancel:p,submit:le},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.keys.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",it,[e.createElementVNode("div",st,[e.createVNode(k,{modelValue:h.value,"onUpdate:modelValue":s[0]||(s[0]=g=>h.value=g),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(i)("gateway_services.form.sections.keys.url.description"),label:e.unref(i)("gateway_services.form.sections.keys.url.label"),"selected-value":Q.url,onChange:ue},null,8,["modelValue","description","label","selected-value"]),e.createVNode(k,{modelValue:h.value,"onUpdate:modelValue":s[1]||(s[1]=g=>h.value=g),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(i)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(i)("gateway_services.form.sections.keys.protocol.label"),"selected-value":Q.protocol,onChange:ue},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[h.value==="url"?(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(C,{modelValue:t.fields.url,"onUpdate:modelValue":s[2]||(s[2]=g=>t.fields.url=g),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:we.value,"error-message":j("url"),label:e.unref(i)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:n.config.app==="konnect"?e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(i)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(i)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:ae},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(U,{appearance:"tertiary","data-testid":"try-sample-api",size:"small",onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[h.value==="protocol"||r.value?(e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(I,{modelValue:t.fields.protocol,"onUpdate:modelValue":s[3]||(s[3]=g=>t.fields.protocol=g),"data-testid":"gateway-service-protocol-select",items:F,label:e.unref(i)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.isReadonly,required:"",width:"100%",onSelected:s[4]||(s[4]=g=>be(t.fields.protocol,g))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(C,{modelValue:t.fields.host,"onUpdate:modelValue":s[5]||(s[5]=g=>t.fields.host=g),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!t.formFieldErrors.host,"error-message":j("host"),label:e.unref(i)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(i)("gateway_services.form.fields.host.placeholder"),required:"",onInput:s[6]||(s[6]=g=>D("host"))},e.createSlots({_:2},[n.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(U,{appearance:"tertiary",size:"small",onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),f.value?(e.openBlock(),e.createElementBlock("div",ct,[e.createVNode(C,{modelValue:t.fields.path,"onUpdate:modelValue":s[7]||(s[7]=g=>t.fields.path=g),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!t.formFieldErrors.path,"error-message":j("path"),label:e.unref(i)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(i)("gateway_services.form.fields.path.placeholder"),onInput:s[8]||(s[8]=g=>D("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(C,{modelValue:t.fields.port,"onUpdate:modelValue":[s[9]||(s[9]=g=>t.fields.port=g),s[11]||(s[11]=()=>{t.fields.port=H(t.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!t.formFieldErrors.port,"error-message":j("port"),label:e.unref(i)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:s[10]||(s[10]=g=>D("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(ce,{modelValue:w.value,"onUpdate:modelValue":s[27]||(s[27]=g=>w.value=g),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",dt,[e.createElementVNode("div",ft,[e.createVNode(C,{modelValue:t.fields.retries,"onUpdate:modelValue":[s[12]||(s[12]=g=>t.fields.retries=g),s[13]||(s[13]=()=>{t.fields.retries=H(t.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(i)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",pt,[e.createVNode(C,{modelValue:t.fields.connect_timeout,"onUpdate:modelValue":[s[14]||(s[14]=g=>t.fields.connect_timeout=g),s[15]||(s[15]=()=>{t.fields.connect_timeout=H(t.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(i)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",mt,[e.createVNode(C,{modelValue:t.fields.write_timeout,"onUpdate:modelValue":[s[16]||(s[16]=g=>t.fields.write_timeout=g),s[17]||(s[17]=()=>{t.fields.write_timeout=H(t.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(i)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",ut,[e.createVNode(C,{modelValue:t.fields.read_timeout,"onUpdate:modelValue":[s[18]||(s[18]=g=>t.fields.read_timeout=g),s[19]||(s[19]=()=>{t.fields.read_timeout=H(t.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(i)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),v.value?(e.openBlock(),e.createElementBlock("div",gt,[e.createVNode(C,{modelValue:t.fields.client_certificate,"onUpdate:modelValue":s[20]||(s[20]=g=>t.fields.client_certificate=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!t.formFieldErrors.client_certificate,label:e.unref(i)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(i)("gateway_services.form.fields.client_certificate.placeholder"),readonly:t.isReadonly,type:"text",onInput:s[21]||(s[21]=g=>ne("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),L.value?(e.openBlock(),e.createElementBlock("div",yt,[e.createVNode(C,{modelValue:t.fields.ca_certificates,"onUpdate:modelValue":s[22]||(s[22]=g=>t.fields.ca_certificates=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!t.formFieldErrors.ca_certificates,label:e.unref(i)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(i)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:t.isReadonly,type:"text",onInput:s[23]||(s[23]=g=>ne("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(W),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("div",_t,[e.createVNode(d,{modelValue:t.fields.tls_verify_enabled,"onUpdate:modelValue":s[24]||(s[24]=g=>t.fields.tls_verify_enabled=g),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(i)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(W),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(i)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",bt,[e.createVNode(k,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":s[25]||(s[25]=g=>t.fields.tls_verify_value=g),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",wt,[e.createVNode(k,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":s[26]||(s[26]=g=>t.fields.tls_verify_value=g),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(i)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))]),_:1})]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(y.EntityFormSection),{description:e.unref(i)("gateway_services.form.sections.general.description"),"hide-info-header":n.hideSectionsInfo,title:e.unref(i)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:t.fields.name,"onUpdate:modelValue":s[28]||(s[28]=g=>t.fields.name=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:pe.value,"error-message":se.value,label:e.unref(i)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(i)("gateway_services.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text",onInput:S},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(ce,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(i)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",ht,[e.createVNode(C,{modelValue:t.fields.tags,"onUpdate:modelValue":s[29]||(s[29]=g=>t.fields.tags=g),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(i)("gateway_services.form.fields.tags.help"),label:e.unref(i)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(i)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(i)("gateway_services.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),t.errorMessages.length?(e.openBlock(),e.createBlock(ge,{key:0,appearance:"danger","data-testid":"form-error"},{default:e.withCtx(()=>[e.createElementVNode("ul",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.errorMessages,g=>(e.openBlock(),e.createElementBlock("li",{key:g},e.toDisplayString(g),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-ce7f08af"]]),{validateHost:kt,validatePort:Ct,validateProtocol:Nt,validatePath:Et}=Z.useUrlValidators(),xt=()=>({validateHost:kt,validatePort:Ct,validateProtocol:Nt,validatePath:Et});R.GatewayServiceConfigCard=rt,R.GatewayServiceForm=Vt,R.GatewayServiceList=Re,R.LegacyGatewayServiceForm=tt,R.useUrlValidator=xt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-shared")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-shared"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x["kong-ui-public-entities-gateway-services"]={},x.Vue,x.VueRouter,x.KongIcons,x["kong-ui-public-i18n"],x["kong-ui-public-entities-shared"]))})(this,function(x,e,ke,te,Ce,u){"use strict";const Ne={actions:{create:"New gateway service",serverless_create:"Add a Service",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",clear:"Clear",view:"View Details",delete:{title:"Delete a Gateway Service",description:"Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",menu_label:"Delete"}},search:{placeholder:{konnect:"Filter by name",kongManager:"Filter by exact name or ID"}},gateway_services:{title:"Gateway Services",list:{toolbar_actions:{new_gateway_service:"New gateway service"},table_headers:{name:"Name",control_plane:"Control Plane",protocol:"Protocol",host:"Host",port:"Port",path:"Path",enabled:"Enabled",tags:"Tags",id:"ID",created_at:"Created At",updated_at:"Last Modified"},empty_state:{title:"Configure a New Gateway Service",description:"Gateway services are used to proxy traffic.",serverless_title:"Configure your first Gateway Service"}},empty_state_v2:{create:"New gateway service",title:"Configure your first gateway service",group:"Services created in gateways within this group will automatically appear here.",description:"Gateway services represent backend APIs or microservices that receive traffic routed through the gateway."},form:{buttons:{try_sample:"Try sample API"},errors:{host:{empty:"Host cannot be empty",invalid:"Invalid host"},port:{type:"Port must be a number",invalid:"Port must be between 0 and 65535"},path:{prefix:"Path must begin with /",invalid:"Path should not include characters outside of the reserved list of RFC 3986"},protocol:{empty:"Protocol cannot be empty",invalid:"Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"},url:{invalid:"The URL must follow a valid format. Example: https://api.kong-air.com/flights"}},sections:{general:{title:"General Information",description:"Provide a name and tags to help identify and manage this service."},keys:{title:"Service endpoint",description:"Define where this service should send requests.",checkedGroupLabel:"Choose how and where to send traffic",urlLabel:"Full URL",checkedGroupAltLabel:"Protocol, host, port and path",url:{label:"Full URL",description:"Define the service using a single, complete API URL for simple setup."},protocol:{label:"Protocol, host, port, and path",description:"Manually specify each component of the API’s URL for advanced configurations."},viewAdvancedFields:"View advanced fields"}},fields:{upstream_url:{label:"Full URL",placeholder:"e.g. https://api.kong-air.com/flights",tooltip_for_konnect:"This is the URL of the API you will manage in Konnect.",tooltip_for_km:"This is the URL of the API you will manage in Kong Gateway."},name:{label:"Name",placeholder:"Enter a unique name",tooltip:"The Service name."},protocol:{label:"Protocol",tooltip:"The protocol used to communicate with the upstream.",options:{http:"http",https:"https",tcp:"tcp",tls:"tls",tls_passthrough:"tls_passthrough",grpc:"grpc",grpcs:"grpcs",ws:"ws",wss:"wss",udp:"udp"}},host:{label:"Host",placeholder:"e.g. api.kong-air.com",tooltip:"The host of the upstream server. Note that the host value is case sensitive."},path:{label:"Path",placeholder:"e.g. /sample",tooltip:"The path to be used in request to the upstream server."},port:{label:"Port",tooltip:"The upstream server port."},retries:{label:"Retries",tooltip:"The number of retries to execute upon failure to proxy."},connect_timeout:{label:"Connection timeout",tooltip:"The timeout in milliseconds for establishing a connection to the upstream server."},write_timeout:{label:"Write timeout",tooltip:"The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."},read_timeout:{label:"Read timeout",tooltip:"The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."},client_certificate:{label:"Client certificate",placeholder:"Enter a Certificate ID",tooltip:"Certificate to be used as client certificate while TLS handshaking to the upstream server."},ca_certificates:{label:"CA certificates",placeholder:"Enter a comma separated list of CA Certificate IDs",tooltip:"Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",code1:"CA Certificate",code2:"null"},tls_verify_enabled:{label:"TLS verify",help:"If unchecked, use default system setting",tooltip:"Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",code1:"null"},tls_verify_option:{unset:{display:"Use default system setting"},true:{label:"True",display:"On"},false:{label:"False",display:"Off"}},tags:{label:"Tags",tooltip:"An optional set of strings associated with the Service for grouping and filtering.",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",collapse:"Add tags"},enabled:{label:"Enabled",tooltip:"Whether the Service is active. If set to {false}, the proxy behavior will be as if any routes attached to it do not exist (404). Default: {true}.",false:"false",true:"true"}}}},errors:{general:"Gateway Services could not be retrieved",delete:"The gateway service could not be deleted at this time.",copy:"Failed to copy to clipboard",urlErrorMessage:"Error: invalid URL"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},glossary:{gateway_services:"gateway services"}};function xe(){const s=Ce.createI18n("en-us",Ne);return{i18n:s,i18nT:Ce.i18nTComponent(s)}}function Se(){return{getPortFromProtocol:(F,p)=>{const n=[80,443],a=Number(p);if((a||a===0)&&!n.includes(a))return a;switch(F){case"grpcs":case"tls":case"https":case"wss":return 443;case"grpc":case"tcp":case"http":case"ws":default:return 80}}}}function Ie(){const{i18n:{t:s}}=M.useI18n();return{validateHost:g=>{if(!g||g.trim()==="")return s("gateway_services.form.errors.host.empty");const N=/^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,63})?$/;return/^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(g)||N.test(g)?"":s("gateway_services.form.errors.host.invalid")},validateProtocol:(g,N)=>!g||g.trim()===""?s("gateway_services.form.errors.protocol.empty"):(g=g.slice(0,-1),N.find(l=>{if(l.value===g)return l})===void 0?s("gateway_services.form.errors.protocol.invalid"):""),validatePath:g=>!g||g===""?"":g.startsWith("/")?/[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(g)?s("gateway_services.form.errors.path.invalid"):"":s("gateway_services.form.errors.path.prefix"),validatePort:g=>{if(g==null||g==="")return"";const N=typeof g=="string"?parseInt(g,10):g;return isNaN(N)?s("gateway_services.form.errors.port.type"):N<0||N>65535?s("gateway_services.form.errors.port.invalid"):""}}}const M={useI18n:xe,usePortFromProtocol:Se,useUrlValidators:Ie},oe="/v2/control-planes/{controlPlaneId}/core-entities",re="/{workspace}",Z={list:{konnect:{all:`${oe}/services`},kongManager:{all:`${re}/services`}},form:{konnect:{create:`${oe}/services`,validate:`${oe}/v1/schemas/json/service/validate`,edit:`${oe}/services/{id}`},kongManager:{create:`${re}/services`,validate:`${re}/schemas/services/validate`,edit:`${re}/services/{id}`}}},Pe="#00abd2",Te="24px",Be={class:"kong-ui-entities-gateway-services-list"},Fe={class:"button-row"},Ae={class:"empty-state-icon-gateway"},$e={key:1},Ue=e.defineComponent({__name:"GatewayServiceList",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||!s.createRoute||!s.getViewRoute||!s.getEditRoute||s.app==="kongManager"&&!s.isExactMatch&&!s.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1},isServerless:{type:Boolean,default:!1},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success","toggle:success"],setup(s,{emit:F}){var z;const p=F,n=s,{i18n:{t:a,formatUnixTimeStamp:g}}=M.useI18n(),N=ke.useRouter(),{axiosInstance:A}=u.useAxios((z=n.config)==null?void 0:z.axiosRequestConfig),{hasRecords:l,handleStateChange:P}=u.useTableState(()=>T.value),k=e.computed(()=>l.value&&n.config.app==="konnect"),ue=e.computed(()=>!n.enableV2EmptyStates&&n.config.app==="konnect"),ie=e.computed(()=>n.config.app!=="kongManager"||!!n.config.disableSorting),J={name:{label:a("gateway_services.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},...n.config.showControlPlaneColumn?{control_plane:{label:a("gateway_services.list.table_headers.control_plane")}}:{},protocol:{label:a("gateway_services.list.table_headers.protocol"),searchable:!0,sortable:!0},host:{label:a("gateway_services.list.table_headers.host"),searchable:!0,sortable:!0},port:{label:a("gateway_services.list.table_headers.port"),searchable:!0,sortable:!0},path:{label:a("gateway_services.list.table_headers.path"),searchable:!0,sortable:!0},enabled:{label:a("gateway_services.list.table_headers.enabled"),searchable:!0,sortable:!0},tags:{label:a("gateway_services.list.table_headers.tags"),sortable:!1},updated_at:{label:a("gateway_services.list.table_headers.updated_at"),sortable:!0},created_at:{label:a("gateway_services.list.table_headers.created_at"),sortable:!0}},le={columnVisibility:{created_at:!1}},me=J,W=e.computed(()=>{var m,y;let c=`${n.config.apiBaseUrl}${Z.list[n.config.app].all}`;return n.config.app==="konnect"?c=c.replace(/{controlPlaneId}/gi,((m=n.config)==null?void 0:m.controlPlaneId)||""):n.config.app==="kongManager"&&(c=c.replace(/\/{workspace}/gi,(y=n.config)!=null&&y.workspace?`/${n.config.workspace}`:"")),c}),ge=e.computed(()=>n.config.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${W.value}`):new URL(W.value)),T=e.ref(""),ye=e.computed(()=>{const c=n.config.app==="konnect"||n.config.isExactMatch;if(c)return{isExactMatch:c,placeholder:a(`search.placeholder.${n.config.app}`)};const{name:m,enabled:y,protocol:V,host:R,port:C,path:D}=J;return{isExactMatch:c,fields:{name:m,enabled:y,protocol:V,host:R,port:C,path:D},schema:n.config.filterSchema}}),{fetcher:K,fetcherState:v,fetcherCacheKey:L}=u.useFetcher(e.computed(()=>({...n.config,cacheIdentifier:n.cacheIdentifier})),W),Q=()=>{T.value=""},_e=()=>{L.value++},t=e.ref(null),b=e.computed(()=>({ctaPath:n.config.createRoute,ctaText:ee.value?n.isServerless?a("actions.serverless_create"):a("actions.create"):void 0,message:`${a("gateway_services.list.empty_state.description")}${n.config.additionMessageForEmptyState?` ${n.config.additionMessageForEmptyState}`:""}`,title:ee.value?n.isServerless?a("gateway_services.list.empty_state.serverless_title"):a("gateway_services.list.empty_state.title"):a("gateway_services.title")})),X=e.ref(!1),S=e.ref(null),j=e.computed(()=>{const c={action:"disable",id:"",name:""};if(S.value){const{enabled:m,id:y,name:V}=S.value;c.action=m?"disable":"enable",c.id=y,c.name=V||y}return c}),he=c=>{X.value=!0,S.value=c},U=()=>{X.value=!1,S.value=null},se=async()=>{var V,R;if(!await((V=n.canEdit)==null?void 0:V.call(n,S.value))||!S.value)return;const m=`${ge.value.href}/${S.value.id}`,y=!S.value.enabled;try{const{data:C}=((R=n.config)==null?void 0:R.app)==="konnect"?await A.put(m,{...S.value,enabled:y}):await A.patch(m,{...S.value,enabled:y});p("toggle:success",C),S.value.enabled=y}catch(C){p("error",C)}},ae=c=>{n.config.getControlPlaneRoute&&N.push(n.config.getControlPlaneRoute(c))},ne=async(c,m)=>{const y=c.id;if(!await m(y)){p("copy:error",{entity:c,field:"id",message:a("errors.copy")});return}p("copy:success",{entity:c,field:"id",message:a("copy.success",{val:y})})},ce=async(c,m)=>{const y=JSON.stringify(c);if(!await m(y)){p("copy:error",{entity:c,message:a("errors.copy")});return}p("copy:success",{entity:c,message:a("copy.success_brief")})},de=async c=>{var y;await((y=n.canRetrieve)==null?void 0:y.call(n,c))&&N.push(n.config.getViewRoute(c.id))},we=c=>({label:a("actions.view"),to:n.config.getViewRoute(c)}),q=c=>({label:a("actions.edit"),to:n.config.getEditRoute(c)}),I=e.ref(void 0),$=e.ref(!1),G=e.ref(!1),Y=e.ref(""),be=u.useDeleteUrlBuilder(n.config,W.value),fe=c=>{I.value=c,$.value=!0,Y.value=""},pe=()=>{$.value=!1,I.value=void 0},ve=async()=>{var c,m,y;if((c=I.value)!=null&&c.id){G.value=!0;try{await A.delete(be(I.value.id)),p("delete:success",I.value),pe(),L.value++}catch(V){Y.value=((y=(m=V.response)==null?void 0:m.data)==null?void 0:y.message)||V.message||a("errors.delete"),p("error",V)}finally{G.value=!1}}},Ve=()=>{N.push(n.config.createRoute)};e.watch(v,c=>{var m,y,V;if(c.status===u.FetcherStatus.Error){t.value={title:a("errors.general")},(V=(y=(m=c.error)==null?void 0:m.response)==null?void 0:y.data)!=null&&V.message&&(t.value.message=c.error.response.data.message),p("error",c.error);return}t.value=null});const ee=e.ref(!1);return e.onBeforeMount(async()=>{ee.value=await n.canCreate()}),(c,m)=>{const y=e.resolveComponent("KButton"),V=e.resolveComponent("KBadge"),R=e.resolveComponent("KInputSwitch"),C=e.resolveComponent("KDropdownItem"),D=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":s.cacheIdentifier,"default-table-preferences":le,"disable-sorting":ie.value,"empty-state-options":b.value,"enable-entity-actions":"","error-message":t.value,fetcher:e.unref(K),"fetcher-cache-key":e.unref(L),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-gateway-services-list",query:T.value,"table-headers":e.unref(me),onClearSearchInput:Q,"onClick:row":m[5]||(m[5]=f=>de(f)),onSort:_e,onState:e.unref(P)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(u.EntityFilter),{modelValue:T.value,"onUpdate:modelValue":m[0]||(m[0]=f=>T.value=f),config:ye.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!s.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Fe,[k.value?(e.openBlock(),e.createBlock(y,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-learn-more-button",icon:"",onClick:m[1]||(m[1]=f=>c.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(te.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>s.canCreate()},{default:e.withCtx(()=>[e.createVNode(y,{appearance:"primary","data-testid":"toolbar-add-gateway-service",size:s.useActionOutside?"medium":"large",to:s.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(te.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("gateway_services.list.toolbar_actions.new_gateway_service")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),name:e.withCtx(({rowValue:f})=>[e.createElementVNode("b",null,e.toDisplayString(f??"-"),1)]),control_plane:e.withCtx(({row:f})=>{var o;return[(o=f.x_meta)!=null&&o.cluster_id?(e.openBlock(),e.createBlock(V,{key:0,tooltip:f.x_meta.cluster_id,"truncation-tooltip":"",onClick:e.withModifiers(r=>ae(f.x_meta.cluster_id),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.x_meta.cluster_id),1)]),_:2},1032,["tooltip","onClick"])):(e.openBlock(),e.createElementBlock("b",$e,"-"))]}),enabled:e.withCtx(({row:f})=>[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>s.canEdit(f),"force-show":""},{default:e.withCtx(({isAllowed:o})=>[e.createElementVNode("div",{onClick:m[4]||(m[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(R,{modelValue:f.enabled,"onUpdate:modelValue":r=>f.enabled=r,"data-testid":`row-${f.id}-toggle-input`,disabled:!o,onClick:e.withModifiers(r=>he(f),["prevent"])},null,8,["modelValue","onUpdate:modelValue","data-testid","disabled","onClick"])])]),_:2},1032,["auth-function"])]),tags:e.withCtx(({rowValue:f})=>[e.createVNode(e.unref(u.TableTags),{tags:f},null,8,["tags"])]),created_at:e.withCtx(({rowValue:f})=>[e.createTextVNode(e.toDisplayString(e.unref(g)(f)),1)]),updated_at:e.withCtx(({row:f,rowValue:o})=>[e.createTextVNode(e.toDisplayString(e.unref(g)(o??f.created_at)),1)]),actions:e.withCtx(({row:f})=>[e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:o})=>[e.createVNode(C,{"data-testid":"action-entity-copy-id",onClick:r=>ne(f,o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:o})=>[e.createVNode(C,{"data-testid":"action-entity-copy-json",onClick:r=>ce(f,o)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>s.canRetrieve(f)},{default:e.withCtx(()=>[e.createVNode(C,{"data-testid":"action-entity-view","has-divider":"",item:we(f.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>s.canEdit(f)},{default:e.withCtx(()=>[e.createVNode(C,{"data-testid":"action-entity-edit",item:q(f.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>s.canDelete(f)},{default:e.withCtx(()=>[e.createVNode(C,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:o=>fe(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("actions.delete.menu_label")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!e.unref(l)&&ue.value?{name:"outside-actions",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!s.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(y,{appearance:"secondary",class:"open-learning-hub","data-testid":"gateway-services-more-button",icon:"",onClick:m[2]||(m[2]=f=>c.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(te.BookIcon),{decorative:""})]),_:1})],8,["disabled"]))]),key:"0"}:void 0,!T.value&&s.enableV2EmptyStates&&s.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var f;return[e.createVNode(e.unref(u.EntityEmptyState),{"action-button-text":e.unref(a)("gateway_services.empty_state_v2.create"),appearance:"secondary","can-create":()=>s.canCreate(),"data-testid":"gateway-services-entity-empty-state",description:e.unref(a)("gateway_services.empty_state_v2.description"),"learn-more":s.config.app==="konnect",title:e.unref(a)("gateway_services.empty_state_v2.title"),"onClick:create":Ve,"onClick:learnMore":m[3]||(m[3]=o=>c.$emit("click:learn-more"))},e.createSlots({image:e.withCtx(()=>[e.createElementVNode("div",Ae,[e.createVNode(e.unref(te.ServicesIcon),{color:e.unref(Pe),size:e.unref(Te)},null,8,["color","size"])])]),_:2},[(f=s.config)!=null&&f.isControlPlaneGroup?{name:"message",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("gateway_services.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["action-button-text","can-create","description","learn-more","title"])]}),key:"1"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(u.EntityToggleModal),{action:j.value.action,"entity-id":j.value.id,"entity-name":j.value.name,"entity-type":e.unref(a)("glossary.gateway_services"),"on-confirm":se,visible:X.value,onCancel:U,onProceed:U},null,8,["action","entity-id","entity-name","entity-type","visible"]),e.createVNode(e.unref(u.EntityDeleteModal),{"action-pending":G.value,description:e.unref(a)("actions.delete.description"),"entity-name":I.value&&(I.value.name||I.value.id),"entity-type":e.unref(u.EntityTypes).GatewayService,error:Y.value,title:e.unref(a)("actions.delete.title"),visible:$.value,onCancel:pe,onProceed:ve},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),Ee=(s,F)=>{const p=s.__vccOpts||s;for(const[n,a]of F)p[n]=a;return p},Re=Ee(Ue,[["__scopeId","data-v-210f19c5"]]),De={class:"kong-ui-gateway-service-entity-config-card"},Me=e.defineComponent({__name:"GatewayServiceConfigCard",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||s.app==="konnect"&&!s.controlPlaneId||s.app==="kongManager"&&typeof s.workspace!="string"||!s.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(s){const F=s,{i18n:{t:p},i18nT:n}=M.useI18n(),a=e.computed(()=>Z.form[F.config.app].edit),{getPropValue:g}=u.useHelpers(),N=(l,P)=>g(l,P)===!0?p("gateway_services.form.fields.tls_verify_option.true.display"):p("gateway_services.form.fields.tls_verify_option.false.display"),A=e.ref({id:{},name:{tooltip:p("gateway_services.form.fields.name.tooltip")},enabled:{},updated_at:{},created_at:{},protocol:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.protocol.tooltip")},host:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.host.tooltip")},path:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.path.tooltip")},port:{section:u.ConfigurationSchemaSection.Basic,tooltip:p("gateway_services.form.fields.port.tooltip")},tags:{tooltip:p("gateway_services.form.fields.tags.tooltip")},retries:{order:1,tooltip:p("gateway_services.form.fields.retries.tooltip")},connect_timeout:{order:2,tooltip:p("gateway_services.form.fields.connect_timeout.tooltip")},write_timeout:{order:3,tooltip:p("gateway_services.form.fields.write_timeout.tooltip")},read_timeout:{order:4,tooltip:p("gateway_services.form.fields.read_timeout.tooltip")},client_certificate:{order:5,tooltip:p("gateway_services.form.fields.client_certificate.tooltip")},ca_certificates:{type:u.ConfigurationSchemaType.BadgeTag,label:p("gateway_services.form.fields.ca_certificates.label"),order:6},tls_verify:{label:p("gateway_services.form.fields.tls_verify_enabled.label")},tls_verify_depth:{hidden:!0}});return(l,P)=>(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(e.unref(u.EntityBaseConfigCard),{config:s.config,"config-card-doc":s.configCardDoc,"config-schema":A.value,"entity-type":e.unref(u.SupportedEntityType).GatewayService,"fetch-url":a.value,"hide-title":s.hideTitle,"onFetch:error":P[0]||(P[0]=k=>l.$emit("fetch:error",k)),"onFetch:success":P[1]||(P[1]=k=>l.$emit("fetch:success",k)),onLoading:P[2]||(P[2]=k=>l.$emit("loading",k))},{"enabled-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.enabled.tooltip",scope:"global"},{false:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.enabled.false")),1)]),true:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.enabled.true")),1)]),_:1})]),"ca_certificates-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),"tls_verify-label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(n),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(p)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),tls_verify:e.withCtx(k=>[e.createTextVNode(e.toDisplayString(typeof e.unref(g)("rowValue",k)=="boolean"?N("rowValue",k):e.unref(p)("gateway_services.form.fields.tls_verify_option.unset.display")),1)]),client_certificate:e.withCtx(k=>[e.createTextVNode(e.toDisplayString(e.unref(g)("rowValue",k)?e.unref(g)("rowValue",k).id:"–"),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),B={name:"Kong-Air-Flights-API",tags:[],protocol:"https",path:"/flights",read_timeout:6e4,retries:5,host:"api.kong-air.com",connect_timeout:6e4,ca_certificates:null,client_certificate:null,write_timeout:6e4,port:443},Ke={class:"kong-ui-entities-gateway-service-form"},Le={key:0,class:"gateway-service-form-general-info"},qe={class:"gateway-service-form-group-selection-wrapper"},Ge={key:0,class:"gateway-service-form-group-fields"},Oe={key:0,class:"gateway-service-form-group-fields"},We={key:0},je={key:0,class:"gateway-service-form-advanced-fields"},ze={class:"gateway-service-form-margin-bottom"},He={class:"gateway-service-form-margin-bottom"},Ze={class:"gateway-service-form-margin-bottom"},Je={class:"gateway-service-form-margin-bottom"},Qe={key:0,class:"gateway-service-form-margin-bottom"},Xe={key:1,class:"gateway-service-form-margin-bottom"},Ye={key:2,class:"gateway-service-form-margin-bottom"},et={key:0,class:"checkbox-aligned-radio"},tt={key:1,class:"checkbox-aligned-radio"},ot={class:"gateway-service-form-tags"},rt={class:"form-error-list"},it=Ee(e.defineComponent({__name:"GatewayServiceForm",props:{config:{type:Object,required:!0,validator:s=>!(!s||!["konnect","kongManager"].includes(s==null?void 0:s.app)||s.app==="konnect"&&!s.controlPlaneId||s.app==="kongManager"&&typeof s.workspace!="string"||!s.cancelRoute)},gatewayServiceId:{type:String,required:!1,default:""},hideSectionsInfo:{type:Boolean,required:!1,default:!1},hideTrySampleApiButton:{type:Boolean,required:!1,default:!1}},emits:["update","error","url-valid:success","url-valid:error","loading","model-updated","try-sample-api"],setup(s,{expose:F,emit:p}){var f;const n=p,a=s,g=e.ref(!0),N=ke.useRouter(),{i18nT:A,i18n:{t:l}}=M.useI18n(),{getErrorFieldsFromError:P}=u.useErrors(),{axiosInstance:k}=u.useAxios((f=a.config)==null?void 0:f.axiosRequestConfig),ue=u.useValidators(),{validateHost:ie,validatePath:J,validatePort:le,validateProtocol:me}=M.useUrlValidators(),{objectsAreEqual:W}=u.useHelpers(),ge=e.computed(()=>Z.form[a.config.app].edit),T=e.computed(()=>a.gatewayServiceId?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),ye=e.ref(!1),K=e.computed(()=>!!a.gatewayServiceId),v=e.ref(K.value?"protocol":"url"),L=M.usePortFromProtocol(),Q=e.ref(""),_e=e.computed(()=>!!Q.value||!!q("name")),t=e.reactive({fields:{name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0},isReadonly:!1,errorMessages:[],formFieldErrors:{host:"",port:"",path:"",name:"",url:"",tags:"",retries:"",connect_timeout:"",write_timeout:"",read_timeout:"",client_certificate:"",ca_certificates:"",tls_verify_enabled:"",tls_verify_value:""}}),b=e.reactive({name:"",protocol:"http",host:"",path:"",port:80,url:"",retries:5,connect_timeout:6e4,write_timeout:6e4,read_timeout:6e4,client_certificate:"",ca_certificates:"",tls_verify_enabled:!1,tls_verify_value:!1,tags:"",enabled:!0}),X=a.config.app==="konnect"||u.useGatewayFeatureSupported({gatewayInfo:a.config.gatewayInfo,supportedRange:{enterprise:["3.0"]}}),S=[{label:l("gateway_services.form.fields.protocol.options.http"),value:"http",group:"http"},{label:l("gateway_services.form.fields.protocol.options.https"),value:"https",group:"http"},{label:l("gateway_services.form.fields.protocol.options.tcp"),value:"tcp",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.tls"),value:"tls",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.tls_passthrough"),value:"tls_passthrough",group:"tcp"},{label:l("gateway_services.form.fields.protocol.options.grpc"),value:"grpc",group:"grpc"},{label:l("gateway_services.form.fields.protocol.options.grpcs"),value:"grpcs",group:"grpc"},...X?[{label:l("gateway_services.form.fields.protocol.options.ws"),value:"ws",group:"websocket"},{label:l("gateway_services.form.fields.protocol.options.wss"),value:"wss",group:"websocket"}]:[],{label:l("gateway_services.form.fields.protocol.options.udp"),value:"udp",group:"udp"}],j={url:"url",protocol:"protocol"},he=(o,r)=>{r.value},U=o=>o?parseFloat(o):0,se=()=>{t.fields.host=b.host,t.fields.path=b.path,t.fields.port=b.port,t.fields.protocol=b.protocol,t.fields.url=b.url,t.fields.retries=b.retries,t.fields.connect_timeout=b.connect_timeout,t.fields.write_timeout=b.write_timeout,t.fields.read_timeout=b.read_timeout,t.fields.client_certificate=b.client_certificate,t.fields.ca_certificates=b.ca_certificates,t.fields.tls_verify_enabled=b.tls_verify_enabled,t.fields.tls_verify_value=b.tls_verify_value,t.fields.enabled=b.enabled},ae=()=>{g.value=!0,$(),t.errorMessages=[],se()},ne=()=>{switch(se(),t.fields.name=`${B.name}-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,v.value){case"url":t.fields.url=`${B.protocol}://${B.host}${B.path}`;break;case"protocol":t.fields.host=B.host,t.fields.path=B.path,t.fields.protocol=B.protocol,t.fields.port=B.port;break;default:t.fields.url=`${B.protocol}://${B.host}${B.path}`}},ce=()=>{if($(),t.fields.url.length)try{const o=new URL(t.fields.url),r=me(o.protocol,S);if(r)throw new Error(r);t.fields.protocol=o.protocol.slice(0,-1);const _=ie(o.hostname);if(_)throw new Error(_);t.fields.host=o.hostname;const E=J(o.pathname);if(E)throw new Error(E);t.fields.path=o.pathname;const h=le(o.port);if(h)throw new Error(h);const w=Number(o.port);ye.value=!!w,t.fields.port=w||L.getPortFromProtocol(t.fields.protocol),n("url-valid:success")}catch{n("url-valid:error",l("gateway_services.form.errors.url.invalid")),t.formFieldErrors.url=l("gateway_services.form.errors.url.invalid")}},de=o=>{$(o)},we=e.computed(()=>!!t.formFieldErrors.url||!!t.formFieldErrors.host||!!t.formFieldErrors.port),q=o=>{if(t.errorMessages.length)return"";const r=t.formFieldErrors;return r[o]?r[o]:""},I=o=>{$(o??void 0);const r=ie(t.fields.host);r&&(t.formFieldErrors.host=r);const _=J(t.fields.path);_&&(t.formFieldErrors.path=_);const E=le(t.fields.port);E&&(t.formFieldErrors.port=E),G.value?n("url-valid:success"):n("url-valid:error",t.errorMessages.join(",")||l("gateway_services.form.errors.url.invalid"))},$=o=>{if(o)t.formFieldErrors[o]="";else for(let r in t.formFieldErrors)t.formFieldErrors[r]="";t.errorMessages=[]},G=e.computed(()=>{for(let o in t.formFieldErrors)if(t.formFieldErrors[o].length)return!1;return!0}),Y=()=>{t.fields.url&&v.value==="url"?ce():I()},be=()=>`new-service-${new Date().toISOString().replace(/\D/g,"").slice(0,17)}`,fe=e.computed(()=>!["tcp","tls","tls_passthrough","grpc","grpcs","udp"].includes(t.fields.protocol)),pe=e.computed(()=>{if(v.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return v.value==="protocol"&&o}),ve=e.computed(()=>{if(v.value==="url")return!0;const o=["https","tls"].includes(t.fields.protocol);return v.value==="protocol"&&o}),Ve=e.computed(()=>{if(v.value==="url")return!0;const o=["https","wss","tls"].includes(t.fields.protocol);return v.value==="protocol"&&o}),ee=o=>{$("name"),Q.value=ue.utf8Name(o)},z=e.computed(()=>{const o=!K.value||!W(t.fields,b),r=v.value==="url"&&!!t.fields.url&&G.value,_=v.value==="protocol"&&!!t.fields.host&&G.value;return o&&(r||_)}),c=o=>{var r,_,E;t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((r=o==null?void 0:o.tags)==null?void 0:r.join(", "))||"",t.fields.protocol=(o==null?void 0:o.protocol)||"http",t.fields.path=(o==null?void 0:o.path)||"",t.fields.read_timeout=o!=null&&o.read_timeout||(o==null?void 0:o.read_timeout)===0?o==null?void 0:o.read_timeout:6e4,t.fields.retries=o!=null&&o.retries||(o==null?void 0:o.retries)===0?o==null?void 0:o.retries:5,t.fields.host=(o==null?void 0:o.host)||"",t.fields.connect_timeout=o!=null&&o.connect_timeout||(o==null?void 0:o.connect_timeout)===0?o==null?void 0:o.connect_timeout:6e4,t.fields.tls_verify_enabled=(o==null?void 0:o.tls_verify)!==""&&(o==null?void 0:o.tls_verify)!==null&&(o==null?void 0:o.tls_verify)!==void 0,t.fields.tls_verify_value=o!=null&&o.tls_verify?o==null?void 0:o.tls_verify:!1,t.fields.ca_certificates=((_=o==null?void 0:o.ca_certificates)==null?void 0:_.join(","))||"",t.fields.client_certificate=((E=o==null?void 0:o.client_certificate)==null?void 0:E.id)||"",t.fields.write_timeout=o!=null&&o.write_timeout||(o==null?void 0:o.write_timeout)===0?o==null?void 0:o.write_timeout:6e4,t.fields.port=o!=null&&o.port||(o==null?void 0:o.port)===0?o==null?void 0:o.port:80,t.fields.enabled=(o==null?void 0:o.enabled)??!0,Object.assign(b,t.fields)},m=()=>{N.push(a.config.cancelRoute)},y=e.computed(()=>{var r,_;let o=`${a.config.apiBaseUrl}${Z.form[a.config.app].validate}`;return a.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((r=a.config)==null?void 0:r.controlPlaneId)||""):a.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(_=a.config)!=null&&_.workspace?`/${a.config.workspace}`:"")),o=o.replace(/{id}/gi,a.gatewayServiceId),o}),V=e.computed(()=>{var r,_;let o=`${a.config.apiBaseUrl}${Z.form[a.config.app][T.value]}`;return a.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((r=a.config)==null?void 0:r.controlPlaneId)||""):a.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(_=a.config)!=null&&_.workspace?`/${a.config.workspace}`:"")),o=o.replace(/{id}/gi,a.gatewayServiceId),o}),R=o=>{let r="";o.url&&(r=new URL(o.url).protocol),(["https","wss","tls"].includes(o.protocol)||["https","wss","tls"].includes(r))&&(o.tls_verify=o.tls_verify_enabled?o.tls_verify_value:null),delete o.tls_verify_enabled,delete o.tls_verify_value},C=e.computed(()=>{var r,_,E,h;const o={name:t.fields.name||null,tags:t.fields.tags?(E=(_=(r=t.fields.tags)==null?void 0:r.split(","))==null?void 0:_.map(w=>String(w||"").trim()))==null?void 0:E.filter(w=>w!==""):null,protocol:t.fields.protocol,path:t.fields.path||null,read_timeout:t.fields.read_timeout,retries:t.fields.retries,host:t.fields.host,connect_timeout:t.fields.connect_timeout,tls_verify_value:t.fields.tls_verify_value,tls_verify_enabled:t.fields.tls_verify_enabled,ca_certificates:t.fields.ca_certificates?(h=t.fields.ca_certificates)==null?void 0:h.split(",").filter(w=>w!==""):null,client_certificate:t.fields.client_certificate?{id:t.fields.client_certificate}:null,write_timeout:t.fields.write_timeout,port:t.fields.port,url:t.fields.url,enabled:t.fields.enabled};return t.fields.client_certificate&&["https","wss","tls"].includes(t.fields.protocol)&&(o.client_certificate={id:t.fields.client_certificate}),t.fields.tls_verify_enabled&&["https","wss","tls"].includes(t.fields.protocol)&&(o.tls_verify=t.fields.tls_verify_value),fe.value||(o.path=null),T.value==="create"?v.value==="url"?(delete o.protocol,delete o.host,delete o.path,a.config.app==="konnect"&&delete o.port):delete o.url:T.value==="edit"&&delete o.url,o}),D=async()=>{var o,r,_,E;try{t.isReadonly=!0;const h=C.value;R(h);let w;if(await k.post(y.value,h),T.value==="create"?w=await k.post(V.value,h):T.value==="edit"&&(w=((o=a.config)==null?void 0:o.app)==="konnect"?await k.put(V.value,h):await k.patch(V.value,h)),w){const{data:i}=w;t.fields.name=(i==null?void 0:i.name)||"",t.fields.port=i.port||L.getPortFromProtocol(i.protocol),t.fields.protocol=(i==null?void 0:i.protocol)||"http",t.fields.host=(i==null?void 0:i.host)||"",t.fields.path=(i==null?void 0:i.path)||"",t.fields.url=(i==null?void 0:i.url)||"",t.fields.retries=i!=null&&i.retries||(i==null?void 0:i.retries)===0?i==null?void 0:i.retries:5,t.fields.connect_timeout=i!=null&&i.connect_timeout||(i==null?void 0:i.connect_timeout)===0?i==null?void 0:i.connect_timeout:6e4,t.fields.write_timeout=i!=null&&i.write_timeout||(i==null?void 0:i.write_timeout)===0?i==null?void 0:i.write_timeout:6e4,t.fields.read_timeout=i!=null&&i.read_timeout||(i==null?void 0:i.read_timeout)===0?i==null?void 0:i.read_timeout:6e4,t.fields.client_certificate=((r=i==null?void 0:i.client_certificate)==null?void 0:r.id)||"",t.fields.ca_certificates=(_=i==null?void 0:i.ca_certificates)!=null&&_.length?i==null?void 0:i.ca_certificates.join(","):"",t.fields.tls_verify_enabled=(i==null?void 0:i.tls_verify)!==""&&(i==null?void 0:i.tls_verify)!==null&&(i==null?void 0:i.tls_verify)!==void 0,t.fields.tls_verify_value=t.fields.tls_verify_enabled&&(i==null?void 0:i.tls_verify),t.fields.tags=(E=i==null?void 0:i.tags)!=null&&E.length?i.tags.join(", "):"",t.fields.enabled=(i==null?void 0:i.enabled)??!0,Object.assign(b,t.fields),n("update",w==null?void 0:w.data)}return w}catch(h){const{fields:w,messages:i}=P(h);t.errorMessages=i,w.length&&w.forEach(O=>{const H=O.field;H==="client_certificate.id"?t.formFieldErrors.client_certificate=O.message:H.startsWith("ca_certificates")?t.formFieldErrors.ca_certificates=O.message:Object.keys(t.formFieldErrors).includes(H)&&(t.formFieldErrors={...t.formFieldErrors,[H]:O.message})}),n("error",h)}finally{t.isReadonly=!1}};return e.watch(()=>a.gatewayServiceId,()=>{Object.assign(t.fields,b)}),e.watch(t.fields,o=>{t.fields.port=L.getPortFromProtocol(o.protocol,String(o.port)),n("model-updated",C.value)}),e.onMounted(()=>{n("model-updated",C.value),K.value||(t.fields.name=be())}),F({validateUrl:Y,getPayload:C,saveFormData:D,canSubmit:z,initForm:c}),(o,r)=>{const _=e.resolveComponent("KRadio"),E=e.resolveComponent("KButton"),h=e.resolveComponent("KInput"),w=e.resolveComponent("KSelect"),i=e.resolveComponent("KCheckbox"),O=e.resolveComponent("KCollapse"),H=e.resolveComponent("KAlert");return e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(e.unref(u.EntityBaseForm),{"can-submit":z.value,config:s.config,"edit-id":s.gatewayServiceId,"entity-type":e.unref(u.SupportedEntityType).GatewayService,"fetch-url":ge.value,"form-fields":C.value,"is-readonly":t.isReadonly,onCancel:m,"onFetch:error":r[30]||(r[30]=d=>o.$emit("error",d)),"onFetch:success":c,onLoading:r[31]||(r[31]=d=>o.$emit("loading",d)),onSubmit:D},{"form-actions":e.withCtx(()=>[e.renderSlot(o.$slots,"form-actions",{canSubmit:z.value,cancel:m,submit:D},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(u.EntityFormSection),{description:e.unref(l)("gateway_services.form.sections.keys.description"),"hide-info-header":s.hideSectionsInfo,title:e.unref(l)("gateway_services.form.sections.keys.title")},{default:e.withCtx(()=>[K.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",qe,[e.createVNode(_,{modelValue:v.value,"onUpdate:modelValue":r[0]||(r[0]=d=>v.value=d),card:"","card-orientation":"horizontal","data-testid":"gateway-service-url-radio",description:e.unref(l)("gateway_services.form.sections.keys.url.description"),label:e.unref(l)("gateway_services.form.sections.keys.url.label"),"selected-value":j.url,onChange:ae},null,8,["modelValue","description","label","selected-value"]),e.createVNode(_,{modelValue:v.value,"onUpdate:modelValue":r[1]||(r[1]=d=>v.value=d),card:"","card-orientation":"horizontal","checked-group":"protocol","data-testid":"gateway-service-protocol-radio",description:e.unref(l)("gateway_services.form.sections.keys.protocol.description"),label:e.unref(l)("gateway_services.form.sections.keys.protocol.label"),"selected-value":j.protocol,onChange:ae},null,8,["modelValue","description","label","selected-value"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[v.value==="url"?(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(h,{modelValue:t.fields.url,"onUpdate:modelValue":r[2]||(r[2]=d=>t.fields.url=d),modelModifiers:{trim:!0},class:"gateway-service-url-input gateway-service-form-margin-bottom","data-testid":"gateway-service-url-input",error:we.value,"error-message":q("url"),label:e.unref(l)("gateway_services.form.fields.upstream_url.label"),"label-attributes":{info:s.config.app==="konnect"?e.unref(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect"):e.unref(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),tooltipAttributes:{maxWidth:"400"}},name:"url",placeholder:e.unref(l)("gateway_services.form.fields.upstream_url.placeholder"),required:"",onInput:ce},e.createSlots({_:2},[s.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(E,{appearance:"tertiary","data-testid":"try-sample-api",size:"small",onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0)]),_:1})])),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[v.value==="protocol"||K.value?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(w,{modelValue:t.fields.protocol,"onUpdate:modelValue":r[3]||(r[3]=d=>t.fields.protocol=d),"data-testid":"gateway-service-protocol-select",items:S,label:e.unref(l)("gateway_services.form.fields.protocol.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.protocol.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:t.isReadonly,required:"",width:"100%",onSelected:r[4]||(r[4]=d=>he(t.fields.protocol,d))},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(h,{modelValue:t.fields.host,"onUpdate:modelValue":r[5]||(r[5]=d=>t.fields.host=d),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-host-input",error:!!t.formFieldErrors.host,"error-message":q("host"),label:e.unref(l)("gateway_services.form.fields.host.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",placeholder:e.unref(l)("gateway_services.form.fields.host.placeholder"),required:"",onInput:r[6]||(r[6]=d=>I("host"))},e.createSlots({_:2},[s.hideTrySampleApiButton?void 0:{name:"after",fn:e.withCtx(()=>[e.createVNode(E,{appearance:"tertiary",size:"small",onClick:ne},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("gateway_services.form.buttons.try_sample")),1)]),_:1})]),key:"0"}]),1032,["modelValue","error","error-message","label","label-attributes","placeholder"]),fe.value?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(h,{modelValue:t.fields.path,"onUpdate:modelValue":r[7]||(r[7]=d=>t.fields.path=d),modelModifiers:{trim:!0},class:"gateway-service-form-margin-top","data-testid":"gateway-service-path-input",error:!!t.formFieldErrors.path,"error-message":q("path"),label:e.unref(l)("gateway_services.form.fields.path.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.path.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"path",placeholder:e.unref(l)("gateway_services.form.fields.path.placeholder"),onInput:r[8]||(r[8]=d=>I("path"))},null,8,["modelValue","error","error-message","label","label-attributes","placeholder"])])):e.createCommentVNode("",!0),e.createVNode(h,{modelValue:t.fields.port,"onUpdate:modelValue":[r[9]||(r[9]=d=>t.fields.port=d),r[11]||(r[11]=()=>{t.fields.port=U(t.fields.port+"")})],class:"gateway-service-form-margin-top","data-testid":"gateway-service-port-input",error:!!t.formFieldErrors.port,"error-message":q("port"),label:e.unref(l)("gateway_services.form.fields.port.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",type:"number",onInput:r[10]||(r[10]=d=>I("port"))},null,8,["modelValue","error","error-message","label","label-attributes"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(O,{modelValue:g.value,"onUpdate:modelValue":r[27]||(r[27]=d=>g.value=d),"data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("gateway_services.form.sections.keys.viewAdvancedFields")},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("div",ze,[e.createVNode(h,{modelValue:t.fields.retries,"onUpdate:modelValue":[r[12]||(r[12]=d=>t.fields.retries=d),r[13]||(r[13]=()=>{t.fields.retries=U(t.fields.retries+"")})],autocomplete:"off","data-testid":"gateway-service-retries-input",label:e.unref(l)("gateway_services.form.fields.retries.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.retries.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"retries",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",He,[e.createVNode(h,{modelValue:t.fields.connect_timeout,"onUpdate:modelValue":[r[14]||(r[14]=d=>t.fields.connect_timeout=d),r[15]||(r[15]=()=>{t.fields.connect_timeout=U(t.fields.connect_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-connTimeout-input",label:e.unref(l)("gateway_services.form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"connTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Ze,[e.createVNode(h,{modelValue:t.fields.write_timeout,"onUpdate:modelValue":[r[16]||(r[16]=d=>t.fields.write_timeout=d),r[17]||(r[17]=()=>{t.fields.write_timeout=U(t.fields.write_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-writeTimeout-input",label:e.unref(l)("gateway_services.form.fields.write_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.write_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"writeTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),e.createElementVNode("div",Je,[e.createVNode(h,{modelValue:t.fields.read_timeout,"onUpdate:modelValue":[r[18]||(r[18]=d=>t.fields.read_timeout=d),r[19]||(r[19]=()=>{t.fields.read_timeout=U(t.fields.read_timeout+"")})],autocomplete:"off","data-testid":"gateway-service-readTimeout-input",label:e.unref(l)("gateway_services.form.fields.read_timeout.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"readTimeout",readonly:t.isReadonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),pe.value?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(h,{modelValue:t.fields.client_certificate,"onUpdate:modelValue":r[20]||(r[20]=d=>t.fields.client_certificate=d),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-clientCert-input",error:!!t.formFieldErrors.client_certificate,label:e.unref(l)("gateway_services.form.fields.client_certificate.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.client_certificate.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"clientCert",placeholder:e.unref(l)("gateway_services.form.fields.client_certificate.placeholder"),readonly:t.isReadonly,type:"text",onInput:r[21]||(r[21]=d=>de("client_certificate"))},null,8,["modelValue","error","label","label-attributes","placeholder","readonly"])])):e.createCommentVNode("",!0),ve.value?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(h,{modelValue:t.fields.ca_certificates,"onUpdate:modelValue":r[22]||(r[22]=d=>t.fields.ca_certificates=d),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-ca-certs-input",error:!!t.formFieldErrors.ca_certificates,label:e.unref(l)("gateway_services.form.fields.ca_certificates.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(l)("gateway_services.form.fields.ca_certificates.placeholder"),readonly:t.isReadonly,type:"text",onInput:r[23]||(r[23]=d=>de("ca_certificates"))},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(A),{keypath:"gateway_services.form.fields.ca_certificates.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.ca_certificates.code1")),1)]),code2:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.ca_certificates.code2")),1)]),_:1})]),_:1},8,["modelValue","error","label","placeholder","readonly"])])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(i,{modelValue:t.fields.tls_verify_enabled,"onUpdate:modelValue":r[24]||(r[24]=d=>t.fields.tls_verify_enabled=d),"data-testid":"gateway-service-tls-verify-checkbox",description:e.unref(l)("gateway_services.form.fields.tls_verify_enabled.help"),label:e.unref(l)("gateway_services.form.fields.tls_verify_enabled.label"),"label-attributes":{tooltipAttributes:{maxWidth:"400"}}},{tooltip:e.withCtx(()=>[e.createVNode(e.unref(A),{keypath:"gateway_services.form.fields.tls_verify_enabled.tooltip",scope:"global"},{code1:e.withCtx(()=>[e.createElementVNode("code",null,e.toDisplayString(e.unref(l)("gateway_services.form.fields.tls_verify_enabled.code1")),1)]),_:1})]),_:1},8,["modelValue","description","label"]),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(_,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":r[25]||(r[25]=d=>t.fields.tls_verify_value=d),"data-testid":"gateway-service-tls-verify-true-option",label:e.unref(l)("gateway_services.form.fields.tls_verify_option.true.label"),"selected-value":!0},null,8,["modelValue","label"])])):e.createCommentVNode("",!0),t.fields.tls_verify_enabled?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(_,{modelValue:t.fields.tls_verify_value,"onUpdate:modelValue":r[26]||(r[26]=d=>t.fields.tls_verify_value=d),"data-testid":"gateway-service-tls-verify-false-option",label:e.unref(l)("gateway_services.form.fields.tls_verify_option.false.label"),"selected-value":!1},null,8,["modelValue","label"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))]),_:1})]),_:1},8,["modelValue","trigger-label"])]),_:1},8,["description","hide-info-header","title"]),e.createVNode(e.unref(u.EntityFormSection),{description:e.unref(l)("gateway_services.form.sections.general.description"),"hide-info-header":s.hideSectionsInfo,title:e.unref(l)("gateway_services.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:t.fields.name,"onUpdate:modelValue":r[28]||(r[28]=d=>t.fields.name=d),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-name-input",error:_e.value,"error-message":Q.value,label:e.unref(l)("gateway_services.form.fields.name.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.name.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"name",placeholder:e.unref(l)("gateway_services.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text",onInput:ee},null,8,["modelValue","error","error-message","label","label-attributes","placeholder","readonly"]),e.createVNode(O,{"data-testid":"tags-collapse","trigger-alignment":"leading","trigger-label":e.unref(l)("gateway_services.form.fields.tags.collapse")},{default:e.withCtx(()=>[e.createElementVNode("div",ot,[e.createVNode(h,{modelValue:t.fields.tags,"onUpdate:modelValue":r[29]||(r[29]=d=>t.fields.tags=d),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"gateway-service-tags-input",help:e.unref(l)("gateway_services.form.fields.tags.help"),label:e.unref(l)("gateway_services.form.fields.tags.label"),"label-attributes":{info:e.unref(l)("gateway_services.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"tags",placeholder:e.unref(l)("gateway_services.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])])]),_:1},8,["trigger-label"])]),_:1},8,["description","hide-info-header","title"]),t.errorMessages.length?(e.openBlock(),e.createBlock(H,{key:0,appearance:"danger","data-testid":"form-error"},{default:e.withCtx(()=>[e.createElementVNode("ul",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.errorMessages,d=>(e.openBlock(),e.createElementBlock("li",{key:d},e.toDisplayString(d),1))),128))])]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["can-submit","config","edit-id","entity-type","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-ce7f08af"]]),{validateHost:lt,validatePort:st,validateProtocol:at,validatePath:nt}=M.useUrlValidators(),ct=()=>({validateHost:lt,validatePort:st,validateProtocol:at,validatePath:nt});x.GatewayServiceConfigCard=Me,x.GatewayServiceForm=it,x.GatewayServiceList=Re,x.useUrlValidator=ct,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{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-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{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-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .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-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .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-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .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-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d86d3e31]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d86d3e31]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d86d3e31]{display:none}.kong-ui-entity-base-table[data-v-d86d3e31] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-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}.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-b6376b66]{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-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{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-b6376b66]{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-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{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-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{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-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{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-b6376b66]{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-b6376b66] .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-b6376b66] .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-b6376b66] .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-b6376b66]{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-b6376b66]{width:640px}}.button-row[data-v-210f19c5]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-210f19c5]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-210f19c5]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-e874c296]{width:100%}.kong-ui-entities-gateway-service-form[data-v-e874c296] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-e874c296]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-e874c296]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-e874c296],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-e874c296] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-group-fields[data-v-e874c296]{margin-left:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-bottom[data-v-e874c296]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-e874c296]{margin:4px;padding-left:24px}.kong-ui-entities-gateway-service-form[data-v-ce7f08af]{width:100%}.kong-ui-entities-gateway-service-form[data-v-ce7f08af] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-ce7f08af] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-ce7f08af] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-ce7f08af]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-ce7f08af]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-ce7f08af]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-ce7f08af]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-ce7f08af]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-ce7f08af],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-ce7f08af] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-ce7f08af]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-ce7f08af]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-ce7f08af] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-ce7f08af]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-ce7f08af]{transition:all .5s ease}.slide-fade-enter-from[data-v-ce7f08af]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-ce7f08af]{opacity:0;transform:translateY(5px)}
|
|
1
|
+
.config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-2feb8c2e] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-5f9aa0e8]{align-items:center;border-bottom:var(--2f90d7f7);box-sizing:border-box;display:var(--668a792a);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-5f9aa0e8]{box-sizing:border-box;padding-right:16px;width:var(--5bc9ad14)}.config-card-details-row .config-card-details-label label[data-v-5f9aa0e8]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-5f9aa0e8]{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-5f9aa0e8]{min-width:0}.config-card-details-row .config-card-details-value[data-v-5f9aa0e8]{box-sizing:border-box;width:var(--5bc5215e)}.config-card-details-row .config-card-details-value .truncated[data-v-5f9aa0e8]{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-5f9aa0e8]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-5f9aa0e8] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-5f9aa0e8]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-5f9aa0e8]{margin-right:4px}.config-card-details-row[data-v-5f9aa0e8] .k-label{margin-bottom:0}.config-card-details-row[data-v-5f9aa0e8] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-5f9aa0e8] .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-b073d014]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form[data-v-b073d014] .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-b073d014] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-b073d014] .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-b073d014] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.form-actions[data-v-b073d014]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.form-actions[data-v-b073d014] .k-button:last-of-type,.form-actions[data-v-b073d014] .k-button:nth-last-of-type(2){margin-left:16px}.content-wrapper[data-v-a3a65cac] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-d86d3e31]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-d86d3e31]{margin-left:auto}.kong-ui-entity-base-table .hidden[data-v-d86d3e31]{display:none}.kong-ui-entity-base-table[data-v-d86d3e31] .empty-state-icon-gateway{background-color:#ecfcff;border-radius:4px;padding:8px}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-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}.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-b6376b66]{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-b6376b66]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-b6376b66]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-b6376b66]{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-b6376b66]{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-b6376b66]{font-size:18px}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{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-b6376b66],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-b6376b66]{margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-b6376b66]{margin-top:16px}.kong-ui-public-entity-empty-state .entity-empty-state-message[data-v-b6376b66]{color:#52596e}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-b6376b66]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-b6376b66]{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-b6376b66]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-b6376b66]{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-b6376b66]{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-b6376b66] .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-b6376b66] .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-b6376b66] .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-b6376b66]{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-b6376b66]{width:640px}}.button-row[data-v-210f19c5]{align-items:center;display:flex;gap:12px}.kong-ui-entities-gateway-services-list[data-v-210f19c5]{width:100%}.kong-ui-entities-gateway-services-list .kong-ui-entity-filter-input[data-v-210f19c5]{margin-right:12px}.kong-ui-entities-gateway-service-form[data-v-ce7f08af]{width:100%}.kong-ui-entities-gateway-service-form[data-v-ce7f08af] .k-tooltip{max-width:300px}.kong-ui-entities-gateway-service-form[data-v-ce7f08af] .k-radio{align-items:normal}.kong-ui-entities-gateway-service-form[data-v-ce7f08af] .form-section-wrapper{padding-bottom:48px}.kong-ui-entities-gateway-service-form .form-error-list[data-v-ce7f08af]{list-style-type:disc;margin:0;padding-left:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-margin-top[data-v-ce7f08af]{margin-top:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-advanced-fields[data-v-ce7f08af]{display:flex;flex-direction:column;gap:16px;margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-tags[data-v-ce7f08af]{margin-left:12px}.kong-ui-entities-gateway-service-form .gateway-service-form-traffic-label[data-v-ce7f08af]{margin-bottom:16px}.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-ce7f08af],.kong-ui-entities-gateway-service-form .gateway-service-url-input[data-v-ce7f08af] .input-element-wrapper{display:flex}.kong-ui-entities-gateway-service-form .gateway-service-form-general-info[data-v-ce7f08af]{display:flex;flex-direction:column;gap:24px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-ce7f08af]{display:flex;flex-direction:row;gap:16px}.kong-ui-entities-gateway-service-form .gateway-service-form-group-selection-wrapper[data-v-ce7f08af] .radio-label-wrapper{height:auto}.kong-ui-entities-gateway-service-form .checkbox-aligned-radio[data-v-ce7f08af]{margin:4px;padding-left:24px}.slide-fade-enter-active[data-v-ce7f08af]{transition:all .5s ease}.slide-fade-enter-from[data-v-ce7f08af]{opacity:0;transform:translateY(-5px)}.slide-fade-leave-to[data-v-ce7f08af]{opacity:0;transform:translateY(5px)}
|
|
@@ -26,8 +26,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
26
26
|
};
|
|
27
27
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
28
|
loading: (isLoading: boolean) => any;
|
|
29
|
-
"fetch:success": (data: Record<string, any>) => any;
|
|
30
29
|
"fetch:error": (error: AxiosError<unknown, any>) => any;
|
|
30
|
+
"fetch:success": (data: Record<string, any>) => any;
|
|
31
31
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
32
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
33
33
|
config: {
|
|
@@ -52,8 +52,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
52
52
|
};
|
|
53
53
|
}>> & Readonly<{
|
|
54
54
|
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
55
|
-
"onFetch:success"?: ((data: Record<string, any>) => any) | undefined;
|
|
56
55
|
"onFetch:error"?: ((error: AxiosError<unknown, any>) => any) | undefined;
|
|
56
|
+
"onFetch:success"?: ((data: Record<string, any>) => any) | undefined;
|
|
57
57
|
}>, {
|
|
58
58
|
configCardDoc: string;
|
|
59
59
|
hideTitle: boolean;
|
|
@@ -47,10 +47,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
47
47
|
initForm: (data: Record<string, any>) => void;
|
|
48
48
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
49
49
|
error: (error: any) => any;
|
|
50
|
+
loading: (isLoading: boolean) => any;
|
|
50
51
|
update: (data: Record<string, any>) => any;
|
|
51
52
|
"url-valid:success": () => any;
|
|
52
53
|
"url-valid:error": (error: string) => any;
|
|
53
|
-
loading: (isLoading: boolean) => any;
|
|
54
54
|
"model-updated": (val: Record<string, any>) => any;
|
|
55
55
|
"try-sample-api": (val: Record<string, any>) => any;
|
|
56
56
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -80,10 +80,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
80
80
|
};
|
|
81
81
|
}>> & Readonly<{
|
|
82
82
|
onError?: ((error: any) => any) | undefined;
|
|
83
|
+
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
83
84
|
onUpdate?: ((data: Record<string, any>) => any) | undefined;
|
|
84
85
|
"onUrl-valid:success"?: (() => any) | undefined;
|
|
85
86
|
"onUrl-valid:error"?: ((error: string) => any) | undefined;
|
|
86
|
-
onLoading?: ((isLoading: boolean) => any) | undefined;
|
|
87
87
|
"onModel-updated"?: ((val: Record<string, any>) => any) | undefined;
|
|
88
88
|
"onTry-sample-api"?: ((val: Record<string, any>) => any) | undefined;
|
|
89
89
|
}>, {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import GatewayServiceList from './components/GatewayServiceList.vue';
|
|
2
|
-
import LegacyGatewayServiceForm from './components/LegacyGatewayServiceForm.vue';
|
|
3
2
|
import GatewayServiceConfigCard from './components/GatewayServiceConfigCard.vue';
|
|
4
3
|
import GatewayServiceForm from './components/GatewayServiceForm.vue';
|
|
5
|
-
export { GatewayServiceList, GatewayServiceForm, GatewayServiceConfigCard
|
|
4
|
+
export { GatewayServiceList, GatewayServiceForm, GatewayServiceConfigCard };
|
|
6
5
|
export * from './utils';
|
|
7
6
|
export * from './types';
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,qCAAqC,CAAA;AACpE,OAAO,wBAAwB,MAAM,2CAA2C,CAAA;AAChF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,qCAAqC,CAAA;AACpE,OAAO,wBAAwB,MAAM,2CAA2C,CAAA;AAChF,OAAO,kBAAkB,MAAM,qCAAqC,CAAA;AAGpE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,CAAA;AAG3E,cAAc,SAAS,CAAA;AAGvB,cAAc,SAAS,CAAA"}
|
|
@@ -44,14 +44,6 @@ export interface FormFieldErrors {
|
|
|
44
44
|
tls_verify_value: string;
|
|
45
45
|
name: string;
|
|
46
46
|
}
|
|
47
|
-
export interface LegacyGatewayServiceFormState {
|
|
48
|
-
/** Form fields */
|
|
49
|
-
fields: GatewayServiceFormFields;
|
|
50
|
-
/** Form readonly state (only used when saving entity details) */
|
|
51
|
-
isReadonly: boolean;
|
|
52
|
-
/** The Array of error messages to show */
|
|
53
|
-
errorMessage: string;
|
|
54
|
-
}
|
|
55
47
|
export interface GatewayServiceFormState {
|
|
56
48
|
/** Form fields */
|
|
57
49
|
fields: GatewayServiceFormFields;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-service-form.d.ts","sourceRoot":"","sources":["../../../src/types/gateway-service-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAEvG,yCAAyC;AACzC,MAAM,WAAW,+BAAgC,SAAQ,qBAAqB;IAC5E,mEAAmE;IACnE,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,8CAA8C;AAC9C,MAAM,WAAW,mCAAoC,SAAQ,yBAAyB;IACpF,mEAAmE;IACnE,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;CACjB;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,IAAI,EAAC,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"gateway-service-form.d.ts","sourceRoot":"","sources":["../../../src/types/gateway-service-form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAEvG,yCAAyC;AACzC,MAAM,WAAW,+BAAgC,SAAQ,qBAAqB;IAC5E,mEAAmE;IACnE,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,8CAA8C;AAC9C,MAAM,WAAW,mCAAoC,SAAQ,yBAAyB;IACpF,mEAAmE;IACnE,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;CACjB;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,IAAI,EAAC,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB;IAClB,MAAM,EAAE,wBAAwB,CAAA;IAChC,iEAAiE;IACjE,UAAU,EAAE,OAAO,CAAA;IACnB,2CAA2C;IAC3C,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,2DAA2D;IAC3D,eAAe,EAAE,eAAe,CAAA;CACjC;AAGD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACtC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9C,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACvC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-gateway-services",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.34-pr.2198.4eddb2429.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-gateway-services.umd.js",
|
|
6
6
|
"module": "./dist/entities-gateway-services.es.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"axios": "^1.7.7",
|
|
27
27
|
"vue": ">= 3.3.13 < 4",
|
|
28
28
|
"vue-router": "^4.4.5",
|
|
29
|
-
"@kong-ui-public/entities-shared": "^3.25.
|
|
30
|
-
"@kong-ui-public/i18n": "^2.3.
|
|
29
|
+
"@kong-ui-public/entities-shared": "^3.25.5-pr.2198.4eddb2429.0",
|
|
30
|
+
"@kong-ui-public/i18n": "^2.3.3-pr.2198.4eddb2429.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@kong/design-tokens": "1.17.4",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
37
|
"vue": "^3.5.13",
|
|
38
38
|
"vue-router": "^4.4.5",
|
|
39
|
-
"@kong-ui-public/entities-shared": "^3.25.
|
|
40
|
-
"@kong-ui-public/i18n": "^2.3.
|
|
39
|
+
"@kong-ui-public/entities-shared": "^3.25.5-pr.2198.4eddb2429.0",
|
|
40
|
+
"@kong-ui-public/i18n": "^2.3.3-pr.2198.4eddb2429.0"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|