@kong-ui-public/entities-keys 3.5.28 → 3.5.29-pr.1701.c6f666f77.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.
@@ -585,9 +585,9 @@ const ve = {
585
585
  kid: e.fields.key_id,
586
586
  name: e.fields.name || null,
587
587
  tags: ((f = (o = (t = e.fields.tags) == null ? void 0 : t.split(",")) == null ? void 0 : o.map((b) => String(b || "").trim())) == null ? void 0 : f.filter((b) => b !== "")) || [],
588
- set: e.fields.key_set ? { id: e.fields.key_set } : null,
589
- jwk: e.fields.key_format === "jwk" ? e.fields.jwk : null,
590
- pem: e.fields.key_format === "pem" ? { private_key: e.fields.private_key, public_key: e.fields.public_key } : null
588
+ set: e.fields.key_set ? { id: e.fields.key_set } : void 0,
589
+ jwk: e.fields.key_format === "jwk" ? e.fields.jwk : void 0,
590
+ pem: e.fields.key_format === "pem" ? { private_key: e.fields.private_key, public_key: e.fields.public_key } : void 0
591
591
  };
592
592
  }), E = async () => {
593
593
  var t, o, f, b, x;
@@ -811,7 +811,7 @@ const ve = {
811
811
  ]);
812
812
  };
813
813
  }
814
- }), mt = /* @__PURE__ */ Ce(rt, [["__scopeId", "data-v-c9e601fc"]]), nt = { class: "kong-ui-entities-keys-entity-config-card" }, dt = { key: 2 }, gt = /* @__PURE__ */ me({
814
+ }), mt = /* @__PURE__ */ Ce(rt, [["__scopeId", "data-v-b9657657"]]), nt = { class: "kong-ui-entities-keys-entity-config-card" }, dt = { key: 2 }, gt = /* @__PURE__ */ me({
815
815
  __name: "KeyConfigCard",
816
816
  props: {
817
817
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -1 +1 @@
1
- (function(C,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):(C=typeof globalThis<"u"?globalThis:C||self,e(C["kong-ui-public-entities-keys"]={},C.Vue,C.VueRouter,C.KongIcons,C["kong-ui-public-i18n"],C["kong-ui-public-entities-shared"]))})(this,function(C,e,ee,le,te,c){"use strict";const ie={keys:{title:"Keys",list:{toolbar_actions:{new_key:"New Key"},table_headers:{name:"Name",key_id:"Key ID",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key",description:"A Key object holds a representation of asymmetric keys in various formats."}},actions:{create:"New Key",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details",loading:"Loading..."},search:{placeholder:"Filter by exact name or ID",no_results:"No results found"},delete:{title:"Delete a Key",description:"This action cannot be reversed so make sure to check the key usage before deleting."},errors:{general:"Keys could not be retrieved",delete:"The key could not be deleted at this time.",copy:"Failed to copy to clipboard",key_sets:{fetch:"Could not fetch available key sets",invalid:"Please select a valid key set ID"}},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key."},keys:{title:"Asymmetric Keys",description:"Choose the preferred format for this asymmetric key. Currently only support PEM and JWK format."}},fields:{id:{label:"Key ID",placeholder:"Enter a key ID",tooltip:"An identifier for a key",help:"If using JWK, need to match with the jwk.kid field"},name:{label:"Name",placeholder:"Enter a unique name for this key",tooltip:"The name to associate with the given key"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."},key_set:{label:"Key Set",placeholder:"Select a key set to add into",footer:"Search by exact ID to find key sets not included in the list"},key_format:{label:"Key Format",options:{jwk:"JWK",pem:"PEM"}},jwk:{label:"JWK",placeholder:"Enter a JWK",tooltip:"A JSON Web key represented as a string"},kid:{label:"Key ID",tooltip:"A unique identifier for a key."},set:{label:"Key Set",tooltip:"The id (an UUID) of the key-set with which to associate the key."},private_key:{label:"Private Key",placeholder:"Enter a private key"},public_key:{label:"Public Key",placeholder:"Enter a public key"}}}}};function ae(){const i=te.createI18n("en-us",ie);return{i18n:i,i18nT:te.i18nTComponent(i)}}const H={useI18n:ae},N="/v2/control-planes/{controlPlaneId}/core-entities",j="/{workspace}",$={list:{konnect:{all:`${N}/keys`,forKeySet:`${N}/key-sets/{keySetId}/keys`},kongManager:{all:`${j}/keys`,forKeySet:`${j}/key-sets/{keySetId}/keys`}},form:{konnect:{create:{all:`${N}/keys`,forKeySet:`${N}/key-sets/{keySetId}/keys`},edit:{all:`${N}/keys/{id}`,forKeySet:`${N}/key-sets/{keySetId}/keys/{id}`},keySets:`${N}/key-sets`,getKeySet:`${N}/key-sets/{keySetId}`},kongManager:{create:{all:`${j}/keys`,forKeySet:`${j}/key-sets/{keySetId}/keys`},edit:{all:`${j}/keys/{id}`,forKeySet:`${j}/key-sets/{keySetId}/keys/{id}`},keySets:`${j}/key-sets`,getKeySet:`${j}/key-sets/{keySetId}`}}},ne={class:"kong-ui-entities-keys-list"},re={key:1},se=e.defineComponent({__name:"KeyList",props:{config:{type:Object,required:!0,validator:i=>!(!i||!["konnect","kongManager"].includes(i==null?void 0:i.app)||!i.createRoute||!i.getViewRoute||!i.getEditRoute||i.app==="kongManager"&&!i.isExactMatch&&!i.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(i,{emit:T}){var G;const h=T,l=i,{i18n:{t:f}}=H.useI18n(),d=ee.useRouter(),{axiosInstance:S}=c.useAxios((G=l.config)==null?void 0:G.axiosRequestConfig),B=e.ref(1),U=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),I={name:{label:f("keys.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},kid:{label:f("keys.list.table_headers.key_id"),sortable:!0},tags:{label:f("keys.list.table_headers.tags")},id:{label:f("keys.list.table_headers.id"),sortable:!0}},t=I,_=e.computed(()=>{var o,a,y,b;let n=`${l.config.apiBaseUrl}${$.list[l.config.app][l.config.keySetId?"forKeySet":"all"]}`;return l.config.app==="konnect"?n=n.replace(/{controlPlaneId}/gi,((o=l.config)==null?void 0:o.controlPlaneId)||"").replace(/{keySetId}/gi,((a=l.config)==null?void 0:a.keySetId)||""):l.config.app==="kongManager"&&(n=n.replace(/\/{workspace}/gi,(y=l.config)!=null&&y.workspace?`/${l.config.workspace}`:"").replace(/{keySetId}/gi,((b=l.config)==null?void 0:b.keySetId)||"")),n}),K=e.ref(""),D=e.computed(()=>{const n=l.config.app==="konnect"||l.config.isExactMatch;if(n)return{isExactMatch:n,placeholder:f("keys.search.placeholder")};const o={name:I.name};return{isExactMatch:n,fields:o,schema:l.config.filterSchema}}),{fetcher:O,fetcherState:J}=c.useFetcher(l.config,_.value),W=()=>{K.value=""},F=()=>{B.value++},s=e.ref(null),u=(n,o)=>{const a=n.id;if(!o(a)){w(n,"id");return}g(n,"id")},V=(n,o)=>{const a=JSON.stringify(n);if(!o(a)){h("copy:error",{entity:n,message:f("keys.errors.copy")});return}h("copy:success",{entity:n,message:f("keys.copy.success_brief")})},g=(n,o)=>{h("copy:success",{entity:n,field:o,message:f("keys.copy.success",{val:n[o]})})},w=(n,o)=>{h("copy:error",{entity:n,field:o,message:f("keys.errors.copy")})},k=async n=>{var a;await((a=l.canRetrieve)==null?void 0:a.call(l,n))&&d.push(l.config.getViewRoute(n.id))},L=n=>({label:f("keys.actions.view"),to:l.config.getViewRoute(n)}),X=n=>({label:f("keys.actions.edit"),to:l.config.getEditRoute(n)}),E=e.ref(void 0),R=e.ref(!1),A=e.ref(!1),Q=e.ref(""),z=c.useDeleteUrlBuilder(l.config,_.value),Y=n=>{E.value=n,R.value=!0},Z=()=>{R.value=!1},v=async()=>{var n,o,a;if((n=E.value)!=null&&n.id){A.value=!0;try{await S.delete(z(E.value.id)),A.value=!1,R.value=!1,B.value++,h("delete:success",E.value)}catch(y){Q.value=((a=(o=y.response)==null?void 0:o.data)==null?void 0:a.message)||y.message||f("keys.errors.delete"),h("error",y)}finally{A.value=!1}}},q=e.ref(!1);e.watch(J,n=>{var o,a,y,b;if(Array.isArray((o=n==null?void 0:n.response)==null?void 0:o.data)&&(q.value=n.response.data.length>0),n.status===c.FetcherStatus.Error){s.value={title:f("keys.errors.general")},(b=(y=(a=n.error)==null?void 0:a.response)==null?void 0:y.data)!=null&&b.message&&(s.value.message=n.error.response.data.message),h("error",n.error);return}s.value=null});const P=e.ref({ctaPath:l.config.createRoute,ctaText:void 0,message:`${f("keys.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:f("keys.title")});return e.onBeforeMount(async()=>{await l.canCreate()&&(P.value.title=f("keys.list.empty_state.title"),P.value.ctaText=f("keys.actions.create"))}),(n,o)=>{const a=e.resolveComponent("KButton"),y=e.resolveComponent("KCopy"),b=e.resolveComponent("KBadge"),x=e.resolveComponent("KTruncate"),r=e.resolveComponent("KDropdownItem"),p=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(e.unref(c.EntityBaseTable),{"cache-identifier":i.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":U.value,"empty-state-options":P.value,"enable-entity-actions":"","error-message":s.value,fetcher:e.unref(O),"fetcher-cache-key":B.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-keys-list",query:K.value,"table-headers":e.unref(t),onClearSearchInput:W,"onClick:row":o[2]||(o[2]=m=>k(m)),onSort:F},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(c.EntityFilter),{modelValue:K.value,"onUpdate:modelValue":o[0]||(o[0]=m=>K.value=m),config:D.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!i.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(a,{appearance:"primary","data-testid":"toolbar-add-key",size:i.useActionOutside?"medium":"large",to:i.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(le.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("keys.list.toolbar_actions.new_key")),1)]),_:1},8,["size","to"]),[[e.vShow,q.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:m})=>[e.createElementVNode("b",null,e.toDisplayString(m??"-"),1)]),kid:e.withCtx(({rowValue:m})=>[e.createVNode(y,{text:m},null,8,["text"])]),tags:e.withCtx(({rowValue:m})=>[(m==null?void 0:m.length)>0?(e.openBlock(),e.createBlock(x,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m,M=>(e.openBlock(),e.createBlock(b,{key:M,onClick:o[1]||(o[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",re,"-"))]),id:e.withCtx(({rowValue:m})=>[e.createVNode(y,{text:m,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:m})=>[e.createVNode(p,null,{default:e.withCtx(({copyToClipboard:M})=>[e.createVNode(r,{"data-testid":"action-entity-copy-id",onClick:Ce=>u(m,M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("keys.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(p,null,{default:e.withCtx(({copyToClipboard:M})=>[e.createVNode(r,{"data-testid":"action-entity-copy-json",onClick:Ce=>V(m,M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("keys.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canRetrieve(m)},{default:e.withCtx(()=>[e.createVNode(r,{"data-testid":"action-entity-view","has-divider":"",item:L(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canEdit(m)},{default:e.withCtx(()=>[e.createVNode(r,{"data-testid":"action-entity-edit",item:X(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canDelete(m)},{default:e.withCtx(()=>[e.createVNode(r,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:M=>Y(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("keys.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(c.EntityDeleteModal),{"action-pending":A.value,description:e.unref(f)("keys.delete.description"),"entity-name":E.value&&(E.value.name||E.value.id),"entity-type":e.unref(c.EntityTypes).Key,error:Q.value,"need-confirm":!1,title:e.unref(f)("keys.delete.title"),visible:R.value,onCancel:Z,onProceed:v},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),oe=(i,T)=>{const h=i.__vccOpts||i;for(const[l,f]of T)h[l]=f;return h},ce=oe(se,[["__scopeId","data-v-7ca9a3a4"]]),de={class:"kong-ui-entities-keys-form"},fe={"data-testid":"no-search-results"},ye={class:"select-item-container"},pe={class:"select-item-label"},ke={class:"select-item-description"},me={key:0,class:"invalid-key-set-message","data-testid":"invalid-key-set-message"},ue={"data-testid":"key-format-container"},ge=oe(e.defineComponent({__name:"KeyForm",props:{config:{type:Object,required:!0,validator:i=>!(!i||!["konnect","kongManager"].includes(i==null?void 0:i.app)||i.app==="konnect"&&!i.controlPlaneId||i.app==="kongManager"&&typeof i.workspace!="string"||!i.cancelRoute)},keyId:{type:String,required:!1,default:""},keySetId:{type:String,required:!1,default:null},fixedKeySetId:{type:String,required:!1,default:""},enableTerraform:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(i,{emit:T}){var n;const h=T,l=i,f=ee.useRouter(),{i18n:{t:d}}=H.useI18n(),{getMessageFromError:S}=c.useErrors(),{axiosInstance:B}=c.useAxios((n=l.config)==null?void 0:n.axiosRequestConfig),U=e.computed(()=>l.keySetId?$.form[l.config.app].edit.forKeySet.replace(/{keySetId}/gi,l.keySetId):$.form[l.config.app].edit.all),I=e.computed(()=>l.keyId?c.EntityBaseFormType.Edit:c.EntityBaseFormType.Create),t=e.reactive({fields:{name:"",tags:"",key_id:"",key_format:"jwk",key_set:"",jwk:"",private_key:"",public_key:""},isReadonly:!1,errorMessage:""}),_=e.reactive({name:"",tags:"",key_id:"",key_format:"jwk",key_set:"",jwk:"",private_key:"",public_key:""}),K=[{label:d("keys.form.fields.key_format.options.jwk"),value:"jwk"},{label:d("keys.form.fields.key_format.options.pem"),value:"pem"}],D=e.computed(()=>t.isReadonly||I.value===c.EntityBaseFormType.Create&&!!l.fixedKeySetId),O=e.computed(()=>!D.value);e.watch(()=>l.fixedKeySetId,o=>{I.value===c.EntityBaseFormType.Create&&(t.fields.key_set=o)},{immediate:!0});const J=e.computed(()=>JSON.stringify(t.fields)!==JSON.stringify(_)&&!!t.fields.key_id&&!!t.fields.key_format&&(t.fields.key_format==="jwk"&&!!t.fields.jwk||t.fields.key_format==="pem"&&!!t.fields.private_key&&!!t.fields.public_key)),W=o=>{var a,y,b,x;t.fields.key_id=(o==null?void 0:o.kid)||"",t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((a=o==null?void 0:o.tags)==null?void 0:a.join(", "))||"",t.fields.key_set=((y=o==null?void 0:o.set)==null?void 0:y.id)||"",t.fields.key_format=o!=null&&o.pem?"pem":"jwk",t.fields.jwk=(o==null?void 0:o.jwk)||"",t.fields.private_key=((b=o==null?void 0:o.pem)==null?void 0:b.private_key)||"",t.fields.public_key=((x=o==null?void 0:o.pem)==null?void 0:x.public_key)||"",Object.assign(_,t.fields)},F=()=>{f.push(l.config.cancelRoute)},s=e.computed(()=>{var a,y;let o=`${l.config.apiBaseUrl}${$.form[l.config.app][I.value][l.keySetId?"forKeySet":"all"]}`;return l.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((a=l.config)==null?void 0:a.controlPlaneId)||""):l.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(y=l.config)!=null&&y.workspace?`/${l.config.workspace}`:"")),o=o.replace(/{id}/gi,l.keyId).replace(/{keySetId}/gi,l.keySetId||""),o}),u=e.computed(()=>{var o,a,y;return{kid:t.fields.key_id,name:t.fields.name||null,tags:((y=(a=(o=t.fields.tags)==null?void 0:o.split(","))==null?void 0:a.map(b=>String(b||"").trim()))==null?void 0:y.filter(b=>b!==""))||[],set:t.fields.key_set?{id:t.fields.key_set}:null,jwk:t.fields.key_format==="jwk"?t.fields.jwk:null,pem:t.fields.key_format==="pem"?{private_key:t.fields.private_key,public_key:t.fields.public_key}:null}}),V=async()=>{var o,a,y,b,x;try{t.isReadonly=!0;let r;if(I.value==="create"?r=await B.post(s.value,u.value):I.value==="edit"&&(r=((o=l.config)==null?void 0:o.app)==="konnect"?await B.put(s.value,u.value):await B.patch(s.value,u.value)),r){const{data:p}=r;t.fields.key_id=(p==null?void 0:p.kid)||"",t.fields.name=(p==null?void 0:p.name)||"",t.fields.tags=((a=p==null?void 0:p.tags)==null?void 0:a.join(", "))||"",t.fields.key_set=((y=p==null?void 0:p.set)==null?void 0:y.id)||"",t.fields.key_format=p!=null&&p.pem?"pem":"jwk",t.fields.jwk=(p==null?void 0:p.jwk)||"",t.fields.private_key=((b=p==null?void 0:p.pem)==null?void 0:b.private_key)||"",t.fields.public_key=((x=p==null?void 0:p.pem)==null?void 0:x.public_key)||"",Object.assign(_,t.fields),h("update",r==null?void 0:r.data)}}catch(r){t.errorMessage=S(r),h("error",r)}finally{t.isReadonly=!1}},{debouncedQueryChange:g,loading:w,allRecords:k,error:L,validationError:X,loadItems:E,results:R}=c.useDebouncedFilter(l.config,$.form[l.config.app].keySets,void 0,{fetchedItemsKey:"data",searchKeys:["id","name"]}),A=o=>{(!o||o!==t.fields.key_set&&o!==_.key_set)&&g(o)},Q=e.computed(()=>L.value?d("keys.errors.key_sets.fetch"):""),z=e.computed(()=>X.value?d("keys.errors.key_sets.invalid"):""),Y=e.ref(0),Z=e.computed(()=>k.value===void 0),v=e.computed(()=>{if(Z.value)return l.config.app==="konnect"?d("keys.form.fields.key_set.footer"):void 0}),q=e.ref(new Set),P=e.computed(()=>Array.from(q.value).map(a=>({name:a.name||"",label:"",value:a.id,selected:t.fields.key_set===a.id}))),G=o=>{q.value.clear();let a;for(a of o)q.value.add(a)};return e.watch(R,o=>{G(o)},{immediate:!0,deep:!0}),e.watch(P,()=>{Y.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await E()}),(o,a)=>{const y=e.resolveComponent("KInput"),b=e.resolveComponent("KSelect"),x=e.resolveComponent("KTextArea");return e.openBlock(),e.createElementBlock("div",de,[e.createVNode(e.unref(c.EntityBaseForm),{"can-submit":J.value,config:i.config,"edit-id":i.keyId,"enable-terraform":i.enableTerraform,"entity-type":e.unref(c.SupportedEntityType).Key,"error-message":t.errorMessage||Q.value,"fetch-url":U.value,"form-fields":u.value,"is-readonly":t.isReadonly,onCancel:F,"onFetch:error":a[8]||(a[8]=r=>o.$emit("error",r)),"onFetch:success":W,onLoading:a[9]||(a[9]=r=>o.$emit("loading",r)),onSubmit:V},{default:e.withCtx(()=>[e.createVNode(e.unref(c.EntityFormSection),{description:e.unref(d)("keys.form.sections.general.description"),title:e.unref(d)("keys.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.fields.key_id,"onUpdate:modelValue":a[0]||(a[0]=r=>t.fields.key_id=r),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-form-id",help:e.unref(d)("keys.form.fields.id.help"),label:e.unref(d)("keys.form.fields.id.label"),"label-attributes":{info:e.unref(d)("keys.form.fields.id.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(d)("keys.form.fields.id.placeholder"),readonly:t.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(y,{modelValue:t.fields.name,"onUpdate:modelValue":a[1]||(a[1]=r=>t.fields.name=r),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-form-name",label:e.unref(d)("keys.form.fields.name.label"),placeholder:e.unref(d)("keys.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(b,{modelValue:t.fields.key_set,"onUpdate:modelValue":a[2]||(a[2]=r=>t.fields.key_set=r),clearable:O.value,"data-testid":"key-form-key-set","dropdown-footer-text":v.value,"enable-filtering":"","filter-function":()=>!0,items:P.value,label:e.unref(d)("keys.form.fields.key_set.label"),loading:e.unref(w),placeholder:e.unref(d)("keys.form.fields.key_set.placeholder"),readonly:D.value,width:"100%",onQueryChange:A},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(d)("keys.actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",fe,e.toDisplayString(e.unref(d)("keys.search.no_results")),1)]),"selected-item-template":e.withCtx(({item:r})=>[e.createElementVNode("div",null,e.toDisplayString(r.name),1)]),"item-template":e.withCtx(({item:r})=>[e.createElementVNode("div",ye,[e.createElementVNode("div",pe,e.toDisplayString(r.name),1),e.createElementVNode("div",ke,e.toDisplayString(r.value),1)])]),_:1},8,["modelValue","clearable","dropdown-footer-text","items","label","loading","placeholder","readonly"]),z.value?(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(z.value),1)):e.createCommentVNode("",!0),e.createVNode(y,{modelValue:t.fields.tags,"onUpdate:modelValue":a[3]||(a[3]=r=>t.fields.tags=r),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-form-tags",help:e.unref(d)("keys.form.fields.tags.help"),label:e.unref(d)("keys.form.fields.tags.label"),"label-attributes":{info:e.unref(d)("keys.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(d)("keys.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(c.EntityFormSection),{description:e.unref(d)("keys.form.sections.keys.description"),"has-divider":"",title:e.unref(d)("keys.form.sections.keys.title")},{default:e.withCtx(()=>[e.createElementVNode("div",ue,[e.createVNode(b,{modelValue:t.fields.key_format,"onUpdate:modelValue":a[4]||(a[4]=r=>t.fields.key_format=r),"data-testid":"key-form-key-format",items:K,label:e.unref(d)("keys.form.fields.key_format.label"),readonly:t.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"])]),t.fields.key_format==="jwk"?(e.openBlock(),e.createBlock(x,{key:0,modelValue:t.fields.jwk,"onUpdate:modelValue":a[5]||(a[5]=r=>t.fields.jwk=r),modelModifiers:{trim:!0},class:"key-form-textarea","data-testid":"key-form-jwk",label:e.unref(d)("keys.form.fields.jwk.label"),"label-attributes":{info:e.unref(d)("keys.form.fields.jwk.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(d)("keys.form.fields.jwk.placeholder"),readonly:t.isReadonly,required:""},null,8,["modelValue","label","label-attributes","placeholder","readonly"])):e.createCommentVNode("",!0),t.fields.key_format==="pem"?(e.openBlock(),e.createBlock(x,{key:1,modelValue:t.fields.private_key,"onUpdate:modelValue":a[6]||(a[6]=r=>t.fields.private_key=r),modelModifiers:{trim:!0},class:"key-form-textarea","data-testid":"key-form-private-key",label:e.unref(d)("keys.form.fields.private_key.label"),placeholder:e.unref(d)("keys.form.fields.private_key.placeholder"),readonly:t.isReadonly,required:""},null,8,["modelValue","label","placeholder","readonly"])):e.createCommentVNode("",!0),t.fields.key_format==="pem"?(e.openBlock(),e.createBlock(x,{key:2,modelValue:t.fields.public_key,"onUpdate:modelValue":a[7]||(a[7]=r=>t.fields.public_key=r),modelModifiers:{trim:!0},class:"key-form-textarea","data-testid":"key-form-public-key",label:e.unref(d)("keys.form.fields.public_key.label"),placeholder:e.unref(d)("keys.form.fields.public_key.placeholder"),readonly:t.isReadonly,required:""},null,8,["modelValue","label","placeholder","readonly"])):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","enable-terraform","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-c9e601fc"]]),be={class:"kong-ui-entities-keys-entity-config-card"},he={key:2},_e=e.defineComponent({__name:"KeyConfigCard",props:{config:{type:Object,required:!0,validator:i=>!(!i||!["konnect","kongManager"].includes(i==null?void 0:i.app)||i.app==="konnect"&&!i.controlPlaneId||i.app==="kongManager"&&typeof i.workspace!="string"||!i.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1},keySetId:{type:String,default:null},enableTerraform:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","navigation-click"],setup(i,{emit:T}){var F;const h=T,l=i,{axiosInstance:f}=c.useAxios((F=l.config)==null?void 0:F.axiosRequestConfig),{convertKeyToTitle:d}=c.useStringHelpers(),{i18n:{t:S}}=H.useI18n(),B=e.computed(()=>l.keySetId?`${$.form[l.config.app].edit.forKeySet}`.replace(/{keySetId}/gi,l.keySetId):$.form[l.config.app].edit.all),U=e.computed(()=>{var s;return(s=$.form[l.config.app])==null?void 0:s.getKeySet}),I=e.ref(),t=e.ref({}),_=e.ref(l.keySetId||""),K=e.ref(""),D=e.ref(!1),O=async s=>{var u;I.value=s,_.value=(u=s==null?void 0:s.set)==null?void 0:u.id,h("fetch:success",s),J(s)};e.watch(_,async()=>{var u,V;if(!_.value)return;let s=`${l.config.apiBaseUrl}${U.value}`;l.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((u=l.config)==null?void 0:u.controlPlaneId)||"").replace(/{keySetId}/gi,_.value||""):l.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(V=l.config)!=null&&V.workspace?`/${l.config.workspace}`:"").replace(/{keySetId}/gi,_.value||""));try{D.value=!0;const{data:g}=await f.get(s,{validateStatus:w=>w===404||w>=200&&w<300});K.value=(g==null?void 0:g.name)||(g==null?void 0:g.id)}catch(g){h("fetch:error",g)}finally{D.value=!1}},{immediate:!0});const J=s=>{var u,V;try{if(s.jwk){const g=JSON.parse(s.jwk);Object.keys(g).forEach(w=>{t.value={...t.value,[`jwk.${w}`]:g[w]}})}else t.value={"pem.public_key":(u=s==null?void 0:s.pem)==null?void 0:u.public_key,"pem.private_key":(V=s==null?void 0:s.pem)==null?void 0:V.private_key}}catch(g){h("fetch:error",g)}return t},W=e.ref({id:{},name:{tooltip:S("keys.form.fields.name.tooltip")},last_updated:{},created:{},set:{label:S("keys.form.fields.set.label"),section:c.ConfigurationSchemaSection.Basic,tooltip:S("keys.form.fields.set.tooltip"),order:5},kid:{label:S("keys.form.fields.kid.label"),section:c.ConfigurationSchemaSection.Basic,tooltip:S("keys.form.fields.kid.tooltip")},tags:{tooltip:S("keys.form.fields.tags.tooltip")},jwk:{label:S("keys.form.fields.jwk.label"),type:c.ConfigurationSchemaType.Json},pem:{section:c.ConfigurationSchemaSection.Advanced,label:S("keys.form.fields.key_format.options.pem"),type:c.ConfigurationSchemaType.Json}});return(s,u)=>{var g,w;const V=e.resolveComponent("KSkeleton");return e.openBlock(),e.createElementBlock("div",be,[e.createVNode(e.unref(c.EntityBaseConfigCard),{config:i.config,"config-card-doc":i.configCardDoc,"config-schema":W.value,"enable-terraform":i.enableTerraform,"entity-type":e.unref(c.SupportedEntityType).Key,"fetch-url":B.value,"hide-title":i.hideTitle,"onFetch:error":u[0]||(u[0]=k=>s.$emit("fetch:error",k)),"onFetch:success":O,onLoading:u[1]||(u[1]=k=>s.$emit("loading",k))},e.createSlots({set:e.withCtx(({row:k})=>[D.value?(e.openBlock(),e.createBlock(V,{key:0,"data-testid":"key-set-name-loader",type:"spinner"})):k.value&&k.value.id===_.value&&K.value?(e.openBlock(),e.createBlock(e.unref(c.InternalLinkItem),{key:1,item:{key:k.value.id,value:K.value,type:e.unref(c.ConfigurationSchemaType).LinkInternal},onClick:L=>s.$emit("navigation-click",k.value.id,"key-sets")},null,8,["item","onClick"])):(e.openBlock(),e.createElementBlock("div",he,e.toDisplayString("–")))]),_:2},[(g=I.value)!=null&&g.jwk?{name:"jwk",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(t.value),k=>(e.openBlock(),e.createBlock(e.unref(c.ConfigCardItem),{key:k,"data-testid":`${k}`,item:{key:k,label:e.unref(d)(k),value:t.value[k]}},null,8,["data-testid","item"]))),128))]),key:"0"}:void 0,(w=I.value)!=null&&w.pem?{name:"pem",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(t.value),k=>(e.openBlock(),e.createBlock(e.unref(c.ConfigCardItem),{key:k,"data-testid":`${k}`,item:{key:k,label:e.unref(d)(k),value:t.value[k]}},null,8,["data-testid","item"]))),128))]),key:"1"}:void 0]),1032,["config","config-card-doc","config-schema","enable-terraform","entity-type","fetch-url","hide-title"])])}}});C.KeyConfigCard=_e,C.KeyForm=ge,C.KeyList=ce,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
1
+ (function(C,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):(C=typeof globalThis<"u"?globalThis:C||self,e(C["kong-ui-public-entities-keys"]={},C.Vue,C.VueRouter,C.KongIcons,C["kong-ui-public-i18n"],C["kong-ui-public-entities-shared"]))})(this,function(C,e,ee,le,te,c){"use strict";const ie={keys:{title:"Keys",list:{toolbar_actions:{new_key:"New Key"},table_headers:{name:"Name",key_id:"Key ID",id:"ID",tags:"Tags"},empty_state:{title:"Configure a New Key",description:"A Key object holds a representation of asymmetric keys in various formats."}},actions:{create:"New Key",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details",loading:"Loading..."},search:{placeholder:"Filter by exact name or ID",no_results:"No results found"},delete:{title:"Delete a Key",description:"This action cannot be reversed so make sure to check the key usage before deleting."},errors:{general:"Keys could not be retrieved",delete:"The key could not be deleted at this time.",copy:"Failed to copy to clipboard",key_sets:{fetch:"Could not fetch available key sets",invalid:"Please select a valid key set ID"}},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},form:{sections:{general:{title:"General Information",description:"General information will help identify and manage this key."},keys:{title:"Asymmetric Keys",description:"Choose the preferred format for this asymmetric key. Currently only support PEM and JWK format."}},fields:{id:{label:"Key ID",placeholder:"Enter a key ID",tooltip:"An identifier for a key",help:"If using JWK, need to match with the jwk.kid field"},name:{label:"Name",placeholder:"Enter a unique name for this key",tooltip:"The name to associate with the given key"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."},key_set:{label:"Key Set",placeholder:"Select a key set to add into",footer:"Search by exact ID to find key sets not included in the list"},key_format:{label:"Key Format",options:{jwk:"JWK",pem:"PEM"}},jwk:{label:"JWK",placeholder:"Enter a JWK",tooltip:"A JSON Web key represented as a string"},kid:{label:"Key ID",tooltip:"A unique identifier for a key."},set:{label:"Key Set",tooltip:"The id (an UUID) of the key-set with which to associate the key."},private_key:{label:"Private Key",placeholder:"Enter a private key"},public_key:{label:"Public Key",placeholder:"Enter a public key"}}}}};function ae(){const i=te.createI18n("en-us",ie);return{i18n:i,i18nT:te.i18nTComponent(i)}}const H={useI18n:ae},N="/v2/control-planes/{controlPlaneId}/core-entities",j="/{workspace}",$={list:{konnect:{all:`${N}/keys`,forKeySet:`${N}/key-sets/{keySetId}/keys`},kongManager:{all:`${j}/keys`,forKeySet:`${j}/key-sets/{keySetId}/keys`}},form:{konnect:{create:{all:`${N}/keys`,forKeySet:`${N}/key-sets/{keySetId}/keys`},edit:{all:`${N}/keys/{id}`,forKeySet:`${N}/key-sets/{keySetId}/keys/{id}`},keySets:`${N}/key-sets`,getKeySet:`${N}/key-sets/{keySetId}`},kongManager:{create:{all:`${j}/keys`,forKeySet:`${j}/key-sets/{keySetId}/keys`},edit:{all:`${j}/keys/{id}`,forKeySet:`${j}/key-sets/{keySetId}/keys/{id}`},keySets:`${j}/key-sets`,getKeySet:`${j}/key-sets/{keySetId}`}}},re={class:"kong-ui-entities-keys-list"},ne={key:1},se=e.defineComponent({__name:"KeyList",props:{config:{type:Object,required:!0,validator:i=>!(!i||!["konnect","kongManager"].includes(i==null?void 0:i.app)||!i.createRoute||!i.getViewRoute||!i.getEditRoute||i.app==="kongManager"&&!i.isExactMatch&&!i.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(i,{emit:T}){var G;const h=T,l=i,{i18n:{t:f}}=H.useI18n(),d=ee.useRouter(),{axiosInstance:S}=c.useAxios((G=l.config)==null?void 0:G.axiosRequestConfig),B=e.ref(1),U=e.computed(()=>l.config.app!=="kongManager"||!!l.config.disableSorting),I={name:{label:f("keys.list.table_headers.name"),searchable:!0,sortable:!0,hidable:!1},kid:{label:f("keys.list.table_headers.key_id"),sortable:!0},tags:{label:f("keys.list.table_headers.tags")},id:{label:f("keys.list.table_headers.id"),sortable:!0}},t=I,_=e.computed(()=>{var o,a,y,b;let r=`${l.config.apiBaseUrl}${$.list[l.config.app][l.config.keySetId?"forKeySet":"all"]}`;return l.config.app==="konnect"?r=r.replace(/{controlPlaneId}/gi,((o=l.config)==null?void 0:o.controlPlaneId)||"").replace(/{keySetId}/gi,((a=l.config)==null?void 0:a.keySetId)||""):l.config.app==="kongManager"&&(r=r.replace(/\/{workspace}/gi,(y=l.config)!=null&&y.workspace?`/${l.config.workspace}`:"").replace(/{keySetId}/gi,((b=l.config)==null?void 0:b.keySetId)||"")),r}),K=e.ref(""),D=e.computed(()=>{const r=l.config.app==="konnect"||l.config.isExactMatch;if(r)return{isExactMatch:r,placeholder:f("keys.search.placeholder")};const o={name:I.name};return{isExactMatch:r,fields:o,schema:l.config.filterSchema}}),{fetcher:O,fetcherState:J}=c.useFetcher(l.config,_.value),W=()=>{K.value=""},F=()=>{B.value++},s=e.ref(null),u=(r,o)=>{const a=r.id;if(!o(a)){w(r,"id");return}g(r,"id")},V=(r,o)=>{const a=JSON.stringify(r);if(!o(a)){h("copy:error",{entity:r,message:f("keys.errors.copy")});return}h("copy:success",{entity:r,message:f("keys.copy.success_brief")})},g=(r,o)=>{h("copy:success",{entity:r,field:o,message:f("keys.copy.success",{val:r[o]})})},w=(r,o)=>{h("copy:error",{entity:r,field:o,message:f("keys.errors.copy")})},k=async r=>{var a;await((a=l.canRetrieve)==null?void 0:a.call(l,r))&&d.push(l.config.getViewRoute(r.id))},L=r=>({label:f("keys.actions.view"),to:l.config.getViewRoute(r)}),X=r=>({label:f("keys.actions.edit"),to:l.config.getEditRoute(r)}),E=e.ref(void 0),R=e.ref(!1),A=e.ref(!1),Q=e.ref(""),z=c.useDeleteUrlBuilder(l.config,_.value),Y=r=>{E.value=r,R.value=!0},Z=()=>{R.value=!1},v=async()=>{var r,o,a;if((r=E.value)!=null&&r.id){A.value=!0;try{await S.delete(z(E.value.id)),A.value=!1,R.value=!1,B.value++,h("delete:success",E.value)}catch(y){Q.value=((a=(o=y.response)==null?void 0:o.data)==null?void 0:a.message)||y.message||f("keys.errors.delete"),h("error",y)}finally{A.value=!1}}},q=e.ref(!1);e.watch(J,r=>{var o,a,y,b;if(Array.isArray((o=r==null?void 0:r.response)==null?void 0:o.data)&&(q.value=r.response.data.length>0),r.status===c.FetcherStatus.Error){s.value={title:f("keys.errors.general")},(b=(y=(a=r.error)==null?void 0:a.response)==null?void 0:y.data)!=null&&b.message&&(s.value.message=r.error.response.data.message),h("error",r.error);return}s.value=null});const P=e.ref({ctaPath:l.config.createRoute,ctaText:void 0,message:`${f("keys.list.empty_state.description")}${l.config.additionMessageForEmptyState?` ${l.config.additionMessageForEmptyState}`:""}`,title:f("keys.title")});return e.onBeforeMount(async()=>{await l.canCreate()&&(P.value.title=f("keys.list.empty_state.title"),P.value.ctaText=f("keys.actions.create"))}),(r,o)=>{const a=e.resolveComponent("KButton"),y=e.resolveComponent("KCopy"),b=e.resolveComponent("KBadge"),x=e.resolveComponent("KTruncate"),n=e.resolveComponent("KDropdownItem"),p=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",re,[e.createVNode(e.unref(c.EntityBaseTable),{"cache-identifier":i.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":U.value,"empty-state-options":P.value,"enable-entity-actions":"","error-message":s.value,fetcher:e.unref(O),"fetcher-cache-key":B.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-keys-list",query:K.value,"table-headers":e.unref(t),onClearSearchInput:W,"onClick:row":o[2]||(o[2]=m=>k(m)),onSort:F},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(c.EntityFilter),{modelValue:K.value,"onUpdate:modelValue":o[0]||(o[0]=m=>K.value=m),config:D.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!i.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canCreate()},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(a,{appearance:"primary","data-testid":"toolbar-add-key",size:i.useActionOutside?"medium":"large",to:i.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(le.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("keys.list.toolbar_actions.new_key")),1)]),_:1},8,["size","to"]),[[e.vShow,q.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),name:e.withCtx(({rowValue:m})=>[e.createElementVNode("b",null,e.toDisplayString(m??"-"),1)]),kid:e.withCtx(({rowValue:m})=>[e.createVNode(y,{text:m},null,8,["text"])]),tags:e.withCtx(({rowValue:m})=>[(m==null?void 0:m.length)>0?(e.openBlock(),e.createBlock(x,{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m,M=>(e.openBlock(),e.createBlock(b,{key:M,onClick:o[1]||(o[1]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M),1)]),_:2},1024))),128))]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",ne,"-"))]),id:e.withCtx(({rowValue:m})=>[e.createVNode(y,{text:m,truncate:""},null,8,["text"])]),actions:e.withCtx(({row:m})=>[e.createVNode(p,null,{default:e.withCtx(({copyToClipboard:M})=>[e.createVNode(n,{"data-testid":"action-entity-copy-id",onClick:Ce=>u(m,M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("keys.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(p,null,{default:e.withCtx(({copyToClipboard:M})=>[e.createVNode(n,{"data-testid":"action-entity-copy-json",onClick:Ce=>V(m,M)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("keys.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canRetrieve(m)},{default:e.withCtx(()=>[e.createVNode(n,{"data-testid":"action-entity-view","has-divider":"",item:L(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canEdit(m)},{default:e.withCtx(()=>[e.createVNode(n,{"data-testid":"action-entity-edit",item:X(m.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(c.PermissionsWrapper),{"auth-function":()=>i.canDelete(m)},{default:e.withCtx(()=>[e.createVNode(n,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:M=>Y(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("keys.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(c.EntityDeleteModal),{"action-pending":A.value,description:e.unref(f)("keys.delete.description"),"entity-name":E.value&&(E.value.name||E.value.id),"entity-type":e.unref(c.EntityTypes).Key,error:Q.value,"need-confirm":!1,title:e.unref(f)("keys.delete.title"),visible:R.value,onCancel:Z,onProceed:v},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),oe=(i,T)=>{const h=i.__vccOpts||i;for(const[l,f]of T)h[l]=f;return h},ce=oe(se,[["__scopeId","data-v-7ca9a3a4"]]),de={class:"kong-ui-entities-keys-form"},fe={"data-testid":"no-search-results"},ye={class:"select-item-container"},pe={class:"select-item-label"},ke={class:"select-item-description"},me={key:0,class:"invalid-key-set-message","data-testid":"invalid-key-set-message"},ue={"data-testid":"key-format-container"},ge=oe(e.defineComponent({__name:"KeyForm",props:{config:{type:Object,required:!0,validator:i=>!(!i||!["konnect","kongManager"].includes(i==null?void 0:i.app)||i.app==="konnect"&&!i.controlPlaneId||i.app==="kongManager"&&typeof i.workspace!="string"||!i.cancelRoute)},keyId:{type:String,required:!1,default:""},keySetId:{type:String,required:!1,default:null},fixedKeySetId:{type:String,required:!1,default:""},enableTerraform:{type:Boolean,default:!1}},emits:["update","error","loading"],setup(i,{emit:T}){var r;const h=T,l=i,f=ee.useRouter(),{i18n:{t:d}}=H.useI18n(),{getMessageFromError:S}=c.useErrors(),{axiosInstance:B}=c.useAxios((r=l.config)==null?void 0:r.axiosRequestConfig),U=e.computed(()=>l.keySetId?$.form[l.config.app].edit.forKeySet.replace(/{keySetId}/gi,l.keySetId):$.form[l.config.app].edit.all),I=e.computed(()=>l.keyId?c.EntityBaseFormType.Edit:c.EntityBaseFormType.Create),t=e.reactive({fields:{name:"",tags:"",key_id:"",key_format:"jwk",key_set:"",jwk:"",private_key:"",public_key:""},isReadonly:!1,errorMessage:""}),_=e.reactive({name:"",tags:"",key_id:"",key_format:"jwk",key_set:"",jwk:"",private_key:"",public_key:""}),K=[{label:d("keys.form.fields.key_format.options.jwk"),value:"jwk"},{label:d("keys.form.fields.key_format.options.pem"),value:"pem"}],D=e.computed(()=>t.isReadonly||I.value===c.EntityBaseFormType.Create&&!!l.fixedKeySetId),O=e.computed(()=>!D.value);e.watch(()=>l.fixedKeySetId,o=>{I.value===c.EntityBaseFormType.Create&&(t.fields.key_set=o)},{immediate:!0});const J=e.computed(()=>JSON.stringify(t.fields)!==JSON.stringify(_)&&!!t.fields.key_id&&!!t.fields.key_format&&(t.fields.key_format==="jwk"&&!!t.fields.jwk||t.fields.key_format==="pem"&&!!t.fields.private_key&&!!t.fields.public_key)),W=o=>{var a,y,b,x;t.fields.key_id=(o==null?void 0:o.kid)||"",t.fields.name=(o==null?void 0:o.name)||"",t.fields.tags=((a=o==null?void 0:o.tags)==null?void 0:a.join(", "))||"",t.fields.key_set=((y=o==null?void 0:o.set)==null?void 0:y.id)||"",t.fields.key_format=o!=null&&o.pem?"pem":"jwk",t.fields.jwk=(o==null?void 0:o.jwk)||"",t.fields.private_key=((b=o==null?void 0:o.pem)==null?void 0:b.private_key)||"",t.fields.public_key=((x=o==null?void 0:o.pem)==null?void 0:x.public_key)||"",Object.assign(_,t.fields)},F=()=>{f.push(l.config.cancelRoute)},s=e.computed(()=>{var a,y;let o=`${l.config.apiBaseUrl}${$.form[l.config.app][I.value][l.keySetId?"forKeySet":"all"]}`;return l.config.app==="konnect"?o=o.replace(/{controlPlaneId}/gi,((a=l.config)==null?void 0:a.controlPlaneId)||""):l.config.app==="kongManager"&&(o=o.replace(/\/{workspace}/gi,(y=l.config)!=null&&y.workspace?`/${l.config.workspace}`:"")),o=o.replace(/{id}/gi,l.keyId).replace(/{keySetId}/gi,l.keySetId||""),o}),u=e.computed(()=>{var o,a,y;return{kid:t.fields.key_id,name:t.fields.name||null,tags:((y=(a=(o=t.fields.tags)==null?void 0:o.split(","))==null?void 0:a.map(b=>String(b||"").trim()))==null?void 0:y.filter(b=>b!==""))||[],set:t.fields.key_set?{id:t.fields.key_set}:void 0,jwk:t.fields.key_format==="jwk"?t.fields.jwk:void 0,pem:t.fields.key_format==="pem"?{private_key:t.fields.private_key,public_key:t.fields.public_key}:void 0}}),V=async()=>{var o,a,y,b,x;try{t.isReadonly=!0;let n;if(I.value==="create"?n=await B.post(s.value,u.value):I.value==="edit"&&(n=((o=l.config)==null?void 0:o.app)==="konnect"?await B.put(s.value,u.value):await B.patch(s.value,u.value)),n){const{data:p}=n;t.fields.key_id=(p==null?void 0:p.kid)||"",t.fields.name=(p==null?void 0:p.name)||"",t.fields.tags=((a=p==null?void 0:p.tags)==null?void 0:a.join(", "))||"",t.fields.key_set=((y=p==null?void 0:p.set)==null?void 0:y.id)||"",t.fields.key_format=p!=null&&p.pem?"pem":"jwk",t.fields.jwk=(p==null?void 0:p.jwk)||"",t.fields.private_key=((b=p==null?void 0:p.pem)==null?void 0:b.private_key)||"",t.fields.public_key=((x=p==null?void 0:p.pem)==null?void 0:x.public_key)||"",Object.assign(_,t.fields),h("update",n==null?void 0:n.data)}}catch(n){t.errorMessage=S(n),h("error",n)}finally{t.isReadonly=!1}},{debouncedQueryChange:g,loading:w,allRecords:k,error:L,validationError:X,loadItems:E,results:R}=c.useDebouncedFilter(l.config,$.form[l.config.app].keySets,void 0,{fetchedItemsKey:"data",searchKeys:["id","name"]}),A=o=>{(!o||o!==t.fields.key_set&&o!==_.key_set)&&g(o)},Q=e.computed(()=>L.value?d("keys.errors.key_sets.fetch"):""),z=e.computed(()=>X.value?d("keys.errors.key_sets.invalid"):""),Y=e.ref(0),Z=e.computed(()=>k.value===void 0),v=e.computed(()=>{if(Z.value)return l.config.app==="konnect"?d("keys.form.fields.key_set.footer"):void 0}),q=e.ref(new Set),P=e.computed(()=>Array.from(q.value).map(a=>({name:a.name||"",label:"",value:a.id,selected:t.fields.key_set===a.id}))),G=o=>{q.value.clear();let a;for(a of o)q.value.add(a)};return e.watch(R,o=>{G(o)},{immediate:!0,deep:!0}),e.watch(P,()=>{Y.value++},{immediate:!0,deep:!0}),e.onBeforeMount(async()=>{await E()}),(o,a)=>{const y=e.resolveComponent("KInput"),b=e.resolveComponent("KSelect"),x=e.resolveComponent("KTextArea");return e.openBlock(),e.createElementBlock("div",de,[e.createVNode(e.unref(c.EntityBaseForm),{"can-submit":J.value,config:i.config,"edit-id":i.keyId,"enable-terraform":i.enableTerraform,"entity-type":e.unref(c.SupportedEntityType).Key,"error-message":t.errorMessage||Q.value,"fetch-url":U.value,"form-fields":u.value,"is-readonly":t.isReadonly,onCancel:F,"onFetch:error":a[8]||(a[8]=n=>o.$emit("error",n)),"onFetch:success":W,onLoading:a[9]||(a[9]=n=>o.$emit("loading",n)),onSubmit:V},{default:e.withCtx(()=>[e.createVNode(e.unref(c.EntityFormSection),{description:e.unref(d)("keys.form.sections.general.description"),title:e.unref(d)("keys.form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.fields.key_id,"onUpdate:modelValue":a[0]||(a[0]=n=>t.fields.key_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-form-id",help:e.unref(d)("keys.form.fields.id.help"),label:e.unref(d)("keys.form.fields.id.label"),"label-attributes":{info:e.unref(d)("keys.form.fields.id.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(d)("keys.form.fields.id.placeholder"),readonly:t.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(y,{modelValue:t.fields.name,"onUpdate:modelValue":a[1]||(a[1]=n=>t.fields.name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-form-name",label:e.unref(d)("keys.form.fields.name.label"),placeholder:e.unref(d)("keys.form.fields.name.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(b,{modelValue:t.fields.key_set,"onUpdate:modelValue":a[2]||(a[2]=n=>t.fields.key_set=n),clearable:O.value,"data-testid":"key-form-key-set","dropdown-footer-text":v.value,"enable-filtering":"","filter-function":()=>!0,items:P.value,label:e.unref(d)("keys.form.fields.key_set.label"),loading:e.unref(w),placeholder:e.unref(d)("keys.form.fields.key_set.placeholder"),readonly:D.value,width:"100%",onQueryChange:A},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(d)("keys.actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",fe,e.toDisplayString(e.unref(d)("keys.search.no_results")),1)]),"selected-item-template":e.withCtx(({item:n})=>[e.createElementVNode("div",null,e.toDisplayString(n.name),1)]),"item-template":e.withCtx(({item:n})=>[e.createElementVNode("div",ye,[e.createElementVNode("div",pe,e.toDisplayString(n.name),1),e.createElementVNode("div",ke,e.toDisplayString(n.value),1)])]),_:1},8,["modelValue","clearable","dropdown-footer-text","items","label","loading","placeholder","readonly"]),z.value?(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(z.value),1)):e.createCommentVNode("",!0),e.createVNode(y,{modelValue:t.fields.tags,"onUpdate:modelValue":a[3]||(a[3]=n=>t.fields.tags=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"key-form-tags",help:e.unref(d)("keys.form.fields.tags.help"),label:e.unref(d)("keys.form.fields.tags.label"),"label-attributes":{info:e.unref(d)("keys.form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(d)("keys.form.fields.tags.placeholder"),readonly:t.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(c.EntityFormSection),{description:e.unref(d)("keys.form.sections.keys.description"),"has-divider":"",title:e.unref(d)("keys.form.sections.keys.title")},{default:e.withCtx(()=>[e.createElementVNode("div",ue,[e.createVNode(b,{modelValue:t.fields.key_format,"onUpdate:modelValue":a[4]||(a[4]=n=>t.fields.key_format=n),"data-testid":"key-form-key-format",items:K,label:e.unref(d)("keys.form.fields.key_format.label"),readonly:t.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"])]),t.fields.key_format==="jwk"?(e.openBlock(),e.createBlock(x,{key:0,modelValue:t.fields.jwk,"onUpdate:modelValue":a[5]||(a[5]=n=>t.fields.jwk=n),modelModifiers:{trim:!0},class:"key-form-textarea","data-testid":"key-form-jwk",label:e.unref(d)("keys.form.fields.jwk.label"),"label-attributes":{info:e.unref(d)("keys.form.fields.jwk.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(d)("keys.form.fields.jwk.placeholder"),readonly:t.isReadonly,required:""},null,8,["modelValue","label","label-attributes","placeholder","readonly"])):e.createCommentVNode("",!0),t.fields.key_format==="pem"?(e.openBlock(),e.createBlock(x,{key:1,modelValue:t.fields.private_key,"onUpdate:modelValue":a[6]||(a[6]=n=>t.fields.private_key=n),modelModifiers:{trim:!0},class:"key-form-textarea","data-testid":"key-form-private-key",label:e.unref(d)("keys.form.fields.private_key.label"),placeholder:e.unref(d)("keys.form.fields.private_key.placeholder"),readonly:t.isReadonly,required:""},null,8,["modelValue","label","placeholder","readonly"])):e.createCommentVNode("",!0),t.fields.key_format==="pem"?(e.openBlock(),e.createBlock(x,{key:2,modelValue:t.fields.public_key,"onUpdate:modelValue":a[7]||(a[7]=n=>t.fields.public_key=n),modelModifiers:{trim:!0},class:"key-form-textarea","data-testid":"key-form-public-key",label:e.unref(d)("keys.form.fields.public_key.label"),placeholder:e.unref(d)("keys.form.fields.public_key.placeholder"),readonly:t.isReadonly,required:""},null,8,["modelValue","label","placeholder","readonly"])):e.createCommentVNode("",!0)]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","enable-terraform","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-b9657657"]]),be={class:"kong-ui-entities-keys-entity-config-card"},he={key:2},_e=e.defineComponent({__name:"KeyConfigCard",props:{config:{type:Object,required:!0,validator:i=>!(!i||!["konnect","kongManager"].includes(i==null?void 0:i.app)||i.app==="konnect"&&!i.controlPlaneId||i.app==="kongManager"&&typeof i.workspace!="string"||!i.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1},keySetId:{type:String,default:null},enableTerraform:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","navigation-click"],setup(i,{emit:T}){var F;const h=T,l=i,{axiosInstance:f}=c.useAxios((F=l.config)==null?void 0:F.axiosRequestConfig),{convertKeyToTitle:d}=c.useStringHelpers(),{i18n:{t:S}}=H.useI18n(),B=e.computed(()=>l.keySetId?`${$.form[l.config.app].edit.forKeySet}`.replace(/{keySetId}/gi,l.keySetId):$.form[l.config.app].edit.all),U=e.computed(()=>{var s;return(s=$.form[l.config.app])==null?void 0:s.getKeySet}),I=e.ref(),t=e.ref({}),_=e.ref(l.keySetId||""),K=e.ref(""),D=e.ref(!1),O=async s=>{var u;I.value=s,_.value=(u=s==null?void 0:s.set)==null?void 0:u.id,h("fetch:success",s),J(s)};e.watch(_,async()=>{var u,V;if(!_.value)return;let s=`${l.config.apiBaseUrl}${U.value}`;l.config.app==="konnect"?s=s.replace(/{controlPlaneId}/gi,((u=l.config)==null?void 0:u.controlPlaneId)||"").replace(/{keySetId}/gi,_.value||""):l.config.app==="kongManager"&&(s=s.replace(/\/{workspace}/gi,(V=l.config)!=null&&V.workspace?`/${l.config.workspace}`:"").replace(/{keySetId}/gi,_.value||""));try{D.value=!0;const{data:g}=await f.get(s,{validateStatus:w=>w===404||w>=200&&w<300});K.value=(g==null?void 0:g.name)||(g==null?void 0:g.id)}catch(g){h("fetch:error",g)}finally{D.value=!1}},{immediate:!0});const J=s=>{var u,V;try{if(s.jwk){const g=JSON.parse(s.jwk);Object.keys(g).forEach(w=>{t.value={...t.value,[`jwk.${w}`]:g[w]}})}else t.value={"pem.public_key":(u=s==null?void 0:s.pem)==null?void 0:u.public_key,"pem.private_key":(V=s==null?void 0:s.pem)==null?void 0:V.private_key}}catch(g){h("fetch:error",g)}return t},W=e.ref({id:{},name:{tooltip:S("keys.form.fields.name.tooltip")},last_updated:{},created:{},set:{label:S("keys.form.fields.set.label"),section:c.ConfigurationSchemaSection.Basic,tooltip:S("keys.form.fields.set.tooltip"),order:5},kid:{label:S("keys.form.fields.kid.label"),section:c.ConfigurationSchemaSection.Basic,tooltip:S("keys.form.fields.kid.tooltip")},tags:{tooltip:S("keys.form.fields.tags.tooltip")},jwk:{label:S("keys.form.fields.jwk.label"),type:c.ConfigurationSchemaType.Json},pem:{section:c.ConfigurationSchemaSection.Advanced,label:S("keys.form.fields.key_format.options.pem"),type:c.ConfigurationSchemaType.Json}});return(s,u)=>{var g,w;const V=e.resolveComponent("KSkeleton");return e.openBlock(),e.createElementBlock("div",be,[e.createVNode(e.unref(c.EntityBaseConfigCard),{config:i.config,"config-card-doc":i.configCardDoc,"config-schema":W.value,"enable-terraform":i.enableTerraform,"entity-type":e.unref(c.SupportedEntityType).Key,"fetch-url":B.value,"hide-title":i.hideTitle,"onFetch:error":u[0]||(u[0]=k=>s.$emit("fetch:error",k)),"onFetch:success":O,onLoading:u[1]||(u[1]=k=>s.$emit("loading",k))},e.createSlots({set:e.withCtx(({row:k})=>[D.value?(e.openBlock(),e.createBlock(V,{key:0,"data-testid":"key-set-name-loader",type:"spinner"})):k.value&&k.value.id===_.value&&K.value?(e.openBlock(),e.createBlock(e.unref(c.InternalLinkItem),{key:1,item:{key:k.value.id,value:K.value,type:e.unref(c.ConfigurationSchemaType).LinkInternal},onClick:L=>s.$emit("navigation-click",k.value.id,"key-sets")},null,8,["item","onClick"])):(e.openBlock(),e.createElementBlock("div",he,e.toDisplayString("–")))]),_:2},[(g=I.value)!=null&&g.jwk?{name:"jwk",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(t.value),k=>(e.openBlock(),e.createBlock(e.unref(c.ConfigCardItem),{key:k,"data-testid":`${k}`,item:{key:k,label:e.unref(d)(k),value:t.value[k]}},null,8,["data-testid","item"]))),128))]),key:"0"}:void 0,(w=I.value)!=null&&w.pem?{name:"pem",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(t.value),k=>(e.openBlock(),e.createBlock(e.unref(c.ConfigCardItem),{key:k,"data-testid":`${k}`,item:{key:k,label:e.unref(d)(k),value:t.value[k]}},null,8,["data-testid","item"]))),128))]),key:"1"}:void 0]),1032,["config","config-card-doc","config-schema","enable-terraform","entity-type","fetch-url","hide-title"])])}}});C.KeyConfigCard=_e,C.KeyForm=ge,C.KeyList=ce,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-85381f68]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-85381f68]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-85381f68]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-85381f68] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-85381f68]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-94d27e50]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-94d27e50]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-94d27e50] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-94d27e50] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-94d27e50] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-94d27e50] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-294e35b2]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-294e35b2]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-294e35b2]{float:right}.kong-ui-entity-base-table .actions-container[data-v-294e35b2] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-94990087]{width:100%}.kong-ui-entity-filter-clear[data-v-94990087]{cursor:pointer}.kong-ui-entity-filter[data-v-94990087]{display:flex;position:relative}.kong-ui-entity-filter[data-v-94990087] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-94990087] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-94990087]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-94990087]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-94990087]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-94990087]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-94990087]{color:#232633}.menu-item-expand-icon[data-v-94990087]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-94990087]{transform:rotate(180deg)}.menu-item-indicator[data-v-94990087]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-94990087]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-94990087] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-94990087] .k-input{width:100%}.menu-item-body[data-v-94990087] .k-select-input .input{font-size:12px}.menu-item-body[data-v-94990087] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-94990087]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-94990087]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-94990087]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-keys-list[data-v-7ca9a3a4]{width:100%}.kong-ui-entities-keys-list .kong-ui-entity-filter-input[data-v-7ca9a3a4]{margin-right:12px}.kong-ui-entities-keys-form[data-v-c9e601fc],.kong-ui-entities-keys-form .key-form-textarea[data-v-c9e601fc]{width:100%}.kong-ui-entities-keys-form .invalid-key-set-message[data-v-c9e601fc]{color:#d60027;font-size:11px;font-weight:500;margin-top:3px!important}.kong-ui-entities-keys-form[data-v-c9e601fc] .k-select .custom-selected-item{left:0}.kong-ui-entities-keys-form .select-item-container .select-item-label[data-v-c9e601fc]{font-weight:600}.kong-ui-entities-keys-form .select-item-container .select-item-description[data-v-c9e601fc]{color:#6c7489;font-size:12px}
1
+ .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-711ebcf2]{align-items:center;border-bottom:var(--2f5b0492);display:var(--5d59c22c);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-711ebcf2]{width:var(--aa41a894)}.config-card-details-row .config-card-details-label label[data-v-711ebcf2]{color:#3a3f51}.config-card-details-row .config-card-details-value[data-v-711ebcf2]{width:var(--aa3d1cde)}.config-card-details-row .config-card-details-value .truncated[data-v-711ebcf2]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-711ebcf2]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-711ebcf2] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-711ebcf2]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-711ebcf2]{margin-right:4px}.config-card-details-row[data-v-711ebcf2] .k-label{margin-bottom:0}.config-card-details-row[data-v-711ebcf2] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-711ebcf2] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-85381f68]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-85381f68]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-85381f68]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-85381f68] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-85381f68]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-94d27e50]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-94d27e50]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-94d27e50] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-94d27e50] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-94d27e50] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-94d27e50] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-94d27e50] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-294e35b2]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-294e35b2]{margin-left:auto}.kong-ui-entity-base-table .actions-container[data-v-294e35b2]{float:right}.kong-ui-entity-base-table .actions-container[data-v-294e35b2] .k-dropdown-item-trigger{margin-bottom:0;margin-top:0}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-94990087]{width:100%}.kong-ui-entity-filter-clear[data-v-94990087]{cursor:pointer}.kong-ui-entity-filter[data-v-94990087]{display:flex;position:relative}.kong-ui-entity-filter[data-v-94990087] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-94990087] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-94990087]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-94990087]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-94990087]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-94990087]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-94990087]{color:#232633}.menu-item-expand-icon[data-v-94990087]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-94990087]{transform:rotate(180deg)}.menu-item-indicator[data-v-94990087]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-94990087]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-94990087] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-94990087] .k-input{width:100%}.menu-item-body[data-v-94990087] .k-select-input .input{font-size:12px}.menu-item-body[data-v-94990087] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-94990087]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-94990087]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-94990087]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-entities-keys-list[data-v-7ca9a3a4]{width:100%}.kong-ui-entities-keys-list .kong-ui-entity-filter-input[data-v-7ca9a3a4]{margin-right:12px}.kong-ui-entities-keys-form[data-v-b9657657],.kong-ui-entities-keys-form .key-form-textarea[data-v-b9657657]{width:100%}.kong-ui-entities-keys-form .invalid-key-set-message[data-v-b9657657]{color:#d60027;font-size:11px;font-weight:500;margin-top:3px!important}.kong-ui-entities-keys-form[data-v-b9657657] .k-select .custom-selected-item{left:0}.kong-ui-entities-keys-form .select-item-container .select-item-label[data-v-b9657657]{font-weight:600}.kong-ui-entities-keys-form .select-item-container .select-item-description[data-v-b9657657]{color:#6c7489;font-size:12px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-keys",
3
- "version": "3.5.28",
3
+ "version": "3.5.29-pr.1701.c6f666f77.0",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-keys.umd.js",
6
6
  "module": "./dist/entities-keys.es.js",