@kong-ui-public/app-layout 2.2.4-pr.985.da712cf1.0 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-layout.es.js +211 -221
- package/dist/app-layout.umd.js +4 -4
- package/package.json +5 -5
package/dist/app-layout.umd.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(D,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(D=typeof globalThis<"u"?globalThis:D||self,e(D["kong-ui-public-app-layout"]={},D.Vue))})(this,function(D,e){"use strict";const At=e.defineComponent({__name:"AccountDropdown",props:{options:{type:Array,required:!0},width:{type:String,default:"240"},userInitials:{type:String,required:!0,default:" "}},setup(o){return(a,n)=>{const r=e.resolveComponent("KDropdownItem"),d=e.resolveComponent("KDropdown");return e.openBlock(),e.createBlock(d,{class:"account-dropdown","kpop-attributes":{placement:"bottomStart"},"trigger-text":o.userInitials,width:o.width},{items:e.withCtx(({handleSelection:f})=>[e.renderSlot(a.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,c=>(e.openBlock(),e.createBlock(r,{key:c.value,class:e.normalizeClass({"has-divider":c.hasDivider}),"data-testid":"select-"+c.value,"has-divider":c.hasDivider,onClick:m=>f(c)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{option:c},()=>[e.createTextVNode(e.toDisplayString(c.label),1)],!0)]),_:2},1032,["class","data-testid","has-divider","onClick"]))),128))],!0)]),_:3},8,["trigger-text","width"])}}}),lr="",U=(o,a)=>{const n=o.__vccOpts||o;for(const[r,d]of a)n[r]=d;return n},xt=U(At,[["__scopeId","data-v-58c79282"]]),Ft={class:"about-section-title","data-testid":"about-section-title"},Dt={class:"about-section-header-end"},Vt={key:0,class:"about-section-timestamps-created","data-testid":"about-section-timestamps-created"},Rt={key:1,class:"about-section-timestamps-arrow"},Lt={key:2,class:"about-section-timestamps-modified","data-testid":"about-section-timestamps-modified"},Mt={key:1,class:"about-section-actions","data-testid":"about-section-actions"},Pt={key:0,"data-testid":"about-section-loading-skeleton"},Zt={key:1},jt={key:0,class:"about-section-description","data-testid":"about-section-description"},Kt={key:1,class:"about-section-content","data-testid":"about-section-content"},Ht={key:2,"data-testid":"about-divider-section-separator"},zt={key:3,class:"about-divider-section","data-testid":"about-divider-section"},Ut=e.defineComponent({__name:"AppAboutSection",props:{title:{type:String,default:""},description:{type:String,default:""},created:{type:String,default:""},createdLabel:{type:String,default:"Created"},modified:{type:String,default:""},modifiedLabel:{type:String,default:"Modified"},isLoading:{type:Boolean,default:!1}},setup(o){const a=o,n=e.computed(()=>!!a.modified&&a.modified!==a.created);return(r,d)=>{const f=e.resolveComponent("KSkeletonBox"),c=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(c,{class:"kong-ui-app-about-section"},e.createSlots({default:e.withCtx(()=>[o.isLoading?(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(f,{height:"2",width:"100"}),e.createVNode(f,{height:"2",width:"100"})])):(e.openBlock(),e.createElementBlock("div",Zt,[o.description?(e.openBlock(),e.createElementBlock("p",jt,e.toDisplayString(o.description),1)):e.createCommentVNode("",!0),r.$slots.default?(e.openBlock(),e.createElementBlock("div",Kt,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),r.$slots["divider-section"]?(e.openBlock(),e.createElementBlock("hr",Ht)):e.createCommentVNode("",!0),r.$slots["divider-section"]?(e.openBlock(),e.createElementBlock("div",zt,[e.renderSlot(r.$slots,"divider-section",{},void 0,!0)])):e.createCommentVNode("",!0)]))]),_:2},[o.title?{name:"title",fn:e.withCtx(()=>[e.createElementVNode("span",Ft,e.toDisplayString(o.title),1)]),key:"0"}:void 0,r.$slots.actions||o.created||o.modified?{name:"actions",fn:e.withCtx(()=>[e.createElementVNode("div",Dt,[o.created||o.modified?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["about-section-timestamps",{"has-actions":r.$slots.actions}])},[o.created?(e.openBlock(),e.createElementBlock("span",Vt,e.toDisplayString(o.createdLabel)+": "+e.toDisplayString(o.created),1)):e.createCommentVNode("",!0),o.created&&n.value?(e.openBlock(),e.createElementBlock("span",Rt,"->")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("span",Lt,e.toDisplayString(o.modifiedLabel)+": "+e.toDisplayString(o.modified),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),r.$slots.actions?(e.openBlock(),e.createElementBlock("div",Mt,[e.renderSlot(r.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)])]),key:"1"}:void 0]),1024)}}}),dr="",ur="",Gt=U(Ut,[["__scopeId","data-v-d4c8058d"]]),Wt={},qt={fill:"none",height:"130",width:"130",xmlns:"http://www.w3.org/2000/svg"},Xt=[e.createStaticVNode('<path clip-rule="evenodd" d="M19.111 120.198c-.226 0-.409-.164-.409-.368v-4.812c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.165-.409-.368v-4.812c0-.204.183-.368.409-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.164-.409-.367V66.89c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368V47.64c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.164-.409-.368v-4.812c0-.204.183-.368.409-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.369v-4.812c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.165-.409-.368V9.138c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368ZM110.889 120.198c-.225 0-.408-.164-.408-.368v-4.812c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.165-.408-.368v-4.812c0-.204.183-.368.408-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.164-.408-.367V66.89c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368V47.64c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.164-.408-.368v-4.812c0-.204.183-.368.408-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.369v-4.812c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.165-.408-.368V9.138c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Z" fill="#D6D6D6" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M123.553 107.758a.399.399 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.399.399 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408H87.69a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.135 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408H37.01a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.067a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.067c.215 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408H6.603a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409ZM123.553 21.434a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.399.399 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409H87.69a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.135 0a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409H37.01a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.387.409H6.603a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Z" fill="#D6D6D6" fill-rule="evenodd"></path><circle cx="65" cy="65" opacity=".5" r="64" stroke="#B6B6BD" stroke-dasharray="5.69 5.69" stroke-linecap="round" stroke-width=".854"></circle><g clip-path="url(#a)" stroke="#169FCC" stroke-miterlimit="10" stroke-width="1.42"><path d="m33.523 104.868-5.72-.695a1.214 1.214 0 0 1-.766-.386 1.182 1.182 0 0 1-.312-.788v-7.448c0-.095.038-.186.106-.253a.365.365 0 0 1 .256-.104l5.254-.263M61.471 22.733a1.761 1.761 0 0 1 1.45.235 49.628 49.628 0 0 1 15.613 17.6 48.797 48.797 0 0 1 5.65 22.702 47.236 47.236 0 0 1-.333 5.325 41.34 41.34 0 0 0-12.501-.441 48.503 48.503 0 0 0-1.813-23.734 49.117 49.117 0 0 0-12.91-20.119c1.602-.591 3.223-1.136 4.844-1.568Z"></path><path d="M71.35 68.154a39.493 39.493 0 0 0-10.813 3.757 51.298 51.298 0 0 0 3.251-18.062c0-9.392-4.939-19.179-9.783-27.237-.257-.432 0-1.616 2.642-2.32"></path><path d="M56.236 78.58a13.605 13.605 0 0 0-4.29-9.289 14.017 14.017 0 0 0-9.622-3.786 9.617 9.617 0 0 1-6.456-2.446 9.341 9.341 0 0 1-3.079-6.1l-.286-4.256c3.09 0 9.46 4.105 13.216 4.866 3.757.76 8.21.253 11.862 3.437a13.303 13.303 0 0 1 4.357 6.575"></path><path d="M68.594 75.442c-3.432 6.95-7.914 11.59-14.303 16.033a47.076 47.076 0 0 1-21.702 8.058v-4.696c11.642-4.809 22.208-11.806 27.948-22.88"></path><path d="M76.499 84.815a46.939 46.939 0 0 1-17.392 14.511 50.925 50.925 0 0 1-22.885 5.457c-2.317 0-3.662.47-3.662-.695v-4.555"></path><path d="M83.85 68.595c22.304 16.22 4.044 39.25-19.652 37.663.954-.939 29.95-22.222-3.661-34.3"></path><path d="M84.184 58.47c13.607 0 25.746 26.242 17.383 30.995-1.182-17.508-17.716-20.87-17.716-20.87"></path></g><defs><clipPath id="a"><path d="M0 0h79v85H0z" fill="#fff" transform="translate(26 22)"></path></clipPath></defs>',5)];function Yt(o,a){return e.openBlock(),e.createElementBlock("svg",qt,Xt)}const Jt=U(Wt,[["render",Yt]]),He=o=>(e.pushScopeId("data-v-5cbccc66"),o=o(),e.popScopeId(),o),Qt={class:"kong-ui-app-error"},ea={class:"banana-icon"},ta={class:"kong-ui-app-error-content"},aa=He(()=>e.createElementVNode("h2",null,"An unexpected error has occurred",-1)),na=He(()=>e.createElementVNode("p",null,[e.createTextVNode("Go back to the previous page or "),e.createElementVNode("a",{href:"/"},"return home"),e.createTextVNode(".")],-1)),oa=e.defineComponent({__name:"AppError",setup(o){return(a,n)=>(e.openBlock(),e.createElementBlock("section",Qt,[e.createElementVNode("div",ea,[e.createVNode(Jt)]),e.createElementVNode("div",ta,[e.renderSlot(a.$slots,"default",{},()=>[aa,na],!0)])]))}}),pr="",mr="",ra=U(oa,[["__scopeId","data-v-5cbccc66"]]),ia={class:"kong-ui-app-navbar"},ca={class:"header-content"},sa={class:"mobile-header-left"},la={key:0,class:"app-navbar-logo"},da={class:"navbar-content"},ua={class:"navbar-content-left"},fa={class:"navbar-content-center"},pa={class:"navbar-content-right"},ma=e.defineComponent({__name:"AppNavbar",props:{topOffset:{type:Number,default:0},leftOffset:{type:Number,default:240},zIndex:{type:Number,default:3}},setup(o){const a=o;e.useCssVars(c=>({d96d0598:f.value.top,"05b18f8e":f.value.zIndex,"543b3ff0":f.value.left,"247c8fd0":d.marginRight,"278e63f0":d.width}));const n=e.useSlots(),r=e.computed(()=>!!n.logo),d=e.reactive({marginRight:"0",width:"0"});e.onMounted(()=>{var c,m;(m=(c=document==null?void 0:document.querySelector(".kong-ui-app-navbar .app-navbar-logo"))==null?void 0:c.children)!=null&&m.length?(d.marginRight="32px",d.width="calc(240px - 32px)"):(d.marginRight="0",d.width="0")});const f=e.computed(()=>({top:a.topOffset?`${a.topOffset}px`:"0",left:a.leftOffset?`${a.leftOffset}px`:"0",zIndex:a.zIndex}));return(c,m)=>(e.openBlock(),e.createElementBlock("header",ia,[e.createElementVNode("div",ca,[e.createElementVNode("div",sa,[e.renderSlot(c.$slots,"mobile-sidebar-toggle"),e.renderSlot(c.$slots,"mobile-logo")]),r.value?(e.openBlock(),e.createElementBlock("div",la,[e.renderSlot(c.$slots,"logo")])):e.createCommentVNode("",!0),e.createElementVNode("div",da,[e.createElementVNode("div",ua,[e.renderSlot(c.$slots,"left")]),e.createElementVNode("div",fa,[e.renderSlot(c.$slots,"center")]),e.createElementVNode("div",pa,[e.renderSlot(c.$slots,"right")])])])]))}}),br="",ze=U(ma,[["__scopeId","data-v-beca6ea9"]]),ba=["title"],Ie=99,ha=e.defineComponent({__name:"ItemBadge",props:{count:{type:Number,required:!0,default:void 0}},setup(o){const a=o,n=e.computed(()=>a.count?a.count>Ie?`${Ie}+`:a.count.toString():"");return(r,d)=>n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"item-badge",title:(o.count||0)>Ie?String(o.count):void 0},e.toDisplayString(n.value),9,ba)):e.createCommentVNode("",!0)}}),hr="",ga=U(ha,[["__scopeId","data-v-912b1a1b"]]),va=["data-testid"],ya=["aria-controls","aria-expanded","href","target","onClick","onKeypress"],_a={key:0,class:"sidebar-item-icon"},ka={class:"sidebar-item-name-container"},wa={class:"sidebar-item-name has-tooltip"},Sa={key:2,class:"sidebar-item-label truncate-text truncate-18"},Ca=["id"],Na=e.defineComponent({__name:"SidebarItem",props:{item:{type:Object,required:!0},subnavItem:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:a}){const n=o,r=e.computed(()=>typeof n.item.to!="string"?!1:!!n.item.newWindow||!!n.item.external||n.item.to.startsWith("http")),d=e.computed(()=>!n.item.to||typeof n.item.to!="string"||!n.item.newWindow?!1:n.item.newWindow&&(n.item.to.startsWith("http")||n.item.to.startsWith("/"))),f=e.computed(()=>n.subnavItem&&n.item.badgeCount!==void 0),c=h=>{a("click",h)},m=(h,v,B)=>{c(v),typeof B=="function"&&(h.preventDefault(),B())};return(h,v)=>{var w;const B=e.resolveComponent("KIcon"),N=e.resolveComponent("KTooltip"),I=e.resolveComponent("SidebarItem",!0);return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([o.subnavItem?"sidebar-item-secondary":"sidebar-item-primary",{expanded:o.item.expanded},{active:o.item.active}]),"data-testid":o.item.testId?`sidebar-item-${o.item.testId}`:void 0},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value?"div":"router-link"),{custom:r.value?void 0:!0,to:!r.value&&!d.value?o.item.to:void 0},{default:e.withCtx(C=>{var j,V;return[e.createElementVNode("a",{"aria-controls":(j=o.item.items)!=null&&j.length&&o.item.expanded?`subnav-${o.item.key}`:void 0,"aria-expanded":(V=o.item.items)!=null&&V.length&&o.item.expanded?!0:void 0,class:e.normalizeClass(["sidebar-item-link",{"sidebar-item-external-link":d.value,"router-link":!r.value}]),href:r.value?String(o.item.to||"#"):C==null?void 0:C.href,target:d.value?"_blank":void 0,onClick:F=>m(F,o.item,C==null?void 0:C.navigate),onKeypress:e.withKeys(F=>m(F,o.item,C==null?void 0:C.navigate),["enter"])},[e.createElementVNode("div",{class:e.normalizeClass(["sidebar-item-display",{"has-label":!!o.item.label&&o.item.expanded,"has-badge":f.value}])},[o.item.icon?(e.openBlock(),e.createElementBlock("div",_a,[e.createVNode(B,{icon:String(o.item.icon),size:"20"},null,8,["icon"])])):e.createCommentVNode("",!0),e.createElementVNode("div",ka,[(o.subnavItem?o.item.name.length<25:o.item.name.length<18)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["sidebar-item-name truncate-text",[o.subnavItem?"has-badge-max-width truncate-24":"truncate-17"]])},e.toDisplayString(o.item.name),3)):(e.openBlock(),e.createBlock(N,{key:1,class:"sidebar-item-tooltip",label:o.item.name,placement:"right","position-fixed":""},{default:e.withCtx(()=>[e.createElementVNode("div",wa,[e.createElementVNode("span",{class:e.normalizeClass(["truncate-text",[o.subnavItem?"truncate-18":"truncate-17",{"has-badge-max-width":f.value}]])},e.toDisplayString(o.item.name),3)])]),_:1},8,["label"])),o.item.label&&o.item.expanded?(e.openBlock(),e.createElementBlock("div",Sa,e.toDisplayString(o.item.label),1)):e.createCommentVNode("",!0)]),f.value?(e.openBlock(),e.createBlock(ga,{key:1,count:o.item.badgeCount},null,8,["count"])):e.createCommentVNode("",!0)],2)],42,ya)]}),_:1},8,["custom","to"])),(w=o.item.items)!=null&&w.length&&o.item.expanded?(e.openBlock(),e.createElementBlock("ul",{key:0,id:`subnav-${o.item.key}`,class:"level-secondary"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.item.items,C=>(e.openBlock(),e.createBlock(I,{key:C.name,item:C,"subnav-item":!0,onClick:j=>c(C)},null,8,["item","onClick"]))),128))],8,Ca)):e.createCommentVNode("",!0)],10,va)}}}),gr="",vr="",Ue=U(Na,[["__scopeId","data-v-34211277"]]);/*!
|
|
1
|
+
(function(D,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(D=typeof globalThis<"u"?globalThis:D||self,e(D["kong-ui-public-app-layout"]={},D.Vue))})(this,function(D,e){"use strict";const At=e.defineComponent({__name:"AccountDropdown",props:{options:{type:Array,required:!0},width:{type:String,default:"240"},userInitials:{type:String,required:!0,default:" "}},setup(o){return(a,n)=>{const r=e.resolveComponent("KDropdownItem"),d=e.resolveComponent("KDropdown");return e.openBlock(),e.createBlock(d,{class:"account-dropdown","kpop-attributes":{placement:"bottomStart"},"trigger-text":o.userInitials,width:o.width},{items:e.withCtx(({handleSelection:f})=>[e.renderSlot(a.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,c=>(e.openBlock(),e.createBlock(r,{key:c.value,class:e.normalizeClass({"has-divider":c.hasDivider}),"data-testid":"select-"+c.value,"has-divider":c.hasDivider,onClick:p=>f(c)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{option:c},()=>[e.createTextVNode(e.toDisplayString(c.label),1)],!0)]),_:2},1032,["class","data-testid","has-divider","onClick"]))),128))],!0)]),_:3},8,["trigger-text","width"])}}}),U=(o,a)=>{const n=o.__vccOpts||o;for(const[r,d]of a)n[r]=d;return n},Ft=U(At,[["__scopeId","data-v-58c79282"]]),xt={class:"about-section-title","data-testid":"about-section-title"},Dt={class:"about-section-header-end"},Vt={key:0,class:"about-section-timestamps-created","data-testid":"about-section-timestamps-created"},Rt={key:1,class:"about-section-timestamps-arrow"},Lt={key:2,class:"about-section-timestamps-modified","data-testid":"about-section-timestamps-modified"},Mt={key:1,class:"about-section-actions","data-testid":"about-section-actions"},Pt={key:0,"data-testid":"about-section-loading-skeleton"},Zt={key:1},jt={key:0,class:"about-section-description","data-testid":"about-section-description"},Kt={key:1,class:"about-section-content","data-testid":"about-section-content"},Ht={key:2,"data-testid":"about-divider-section-separator"},zt={key:3,class:"about-divider-section","data-testid":"about-divider-section"},Ut=U(e.defineComponent({__name:"AppAboutSection",props:{title:{type:String,default:""},description:{type:String,default:""},created:{type:String,default:""},createdLabel:{type:String,default:"Created"},modified:{type:String,default:""},modifiedLabel:{type:String,default:"Modified"},isLoading:{type:Boolean,default:!1}},setup(o){const a=o,n=e.computed(()=>!!a.modified&&a.modified!==a.created);return(r,d)=>{const f=e.resolveComponent("KSkeletonBox"),c=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(c,{class:"kong-ui-app-about-section"},e.createSlots({default:e.withCtx(()=>[o.isLoading?(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(f,{height:"2",width:"100"}),e.createVNode(f,{height:"2",width:"100"})])):(e.openBlock(),e.createElementBlock("div",Zt,[o.description?(e.openBlock(),e.createElementBlock("p",jt,e.toDisplayString(o.description),1)):e.createCommentVNode("",!0),r.$slots.default?(e.openBlock(),e.createElementBlock("div",Kt,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),r.$slots["divider-section"]?(e.openBlock(),e.createElementBlock("hr",Ht)):e.createCommentVNode("",!0),r.$slots["divider-section"]?(e.openBlock(),e.createElementBlock("div",zt,[e.renderSlot(r.$slots,"divider-section",{},void 0,!0)])):e.createCommentVNode("",!0)]))]),_:2},[o.title?{name:"title",fn:e.withCtx(()=>[e.createElementVNode("span",xt,e.toDisplayString(o.title),1)]),key:"0"}:void 0,r.$slots.actions||o.created||o.modified?{name:"actions",fn:e.withCtx(()=>[e.createElementVNode("div",Dt,[o.created||o.modified?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["about-section-timestamps",{"has-actions":r.$slots.actions}])},[o.created?(e.openBlock(),e.createElementBlock("span",Vt,e.toDisplayString(o.createdLabel)+": "+e.toDisplayString(o.created),1)):e.createCommentVNode("",!0),o.created&&n.value?(e.openBlock(),e.createElementBlock("span",Rt,"->")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("span",Lt,e.toDisplayString(o.modifiedLabel)+": "+e.toDisplayString(o.modified),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),r.$slots.actions?(e.openBlock(),e.createElementBlock("div",Mt,[e.renderSlot(r.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)])]),key:"1"}:void 0]),1024)}}}),[["__scopeId","data-v-d4c8058d"]]),Gt={},Wt={fill:"none",height:"130",width:"130",xmlns:"http://www.w3.org/2000/svg"},qt=[e.createStaticVNode('<path clip-rule="evenodd" d="M19.111 120.198c-.226 0-.409-.164-.409-.368v-4.812c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.165-.409-.368v-4.812c0-.204.183-.368.409-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.164-.409-.367V66.89c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368V47.64c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.164-.409-.368v-4.812c0-.204.183-.368.409-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.368v-4.813c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.226 0-.409-.165-.409-.369v-4.812c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.226 0-.409-.165-.409-.368V9.138c0-.203.183-.368.409-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368ZM110.889 120.198c-.225 0-.408-.164-.408-.368v-4.812c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.165-.408-.368v-4.812c0-.204.183-.368.408-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.164-.408-.367V66.89c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368V47.64c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.164-.408-.368v-4.812c0-.204.183-.368.408-.368.226 0 .409.164.409.368v4.812c0 .204-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.368v-4.813c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.625c-.225 0-.408-.165-.408-.369v-4.812c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Zm0-9.626c-.225 0-.408-.165-.408-.368V9.138c0-.203.183-.368.408-.368.226 0 .409.165.409.368v4.813c0 .203-.183.368-.409.368Z" fill="#D6D6D6" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M123.553 107.758a.399.399 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.399.399 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408H87.69a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.135 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.068a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408H37.01a.398.398 0 0 1-.387-.408c0-.226.173-.409.387-.409h5.068c.214 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.388.408h-5.067a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.067c.215 0 .388.183.388.409Zm-10.136 0a.398.398 0 0 1-.387.408h-5.068a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409Zm-10.136 0a.398.398 0 0 1-.387.408H6.603a.398.398 0 0 1-.388-.408c0-.226.174-.409.388-.409h5.068c.214 0 .387.183.387.409ZM123.553 21.434a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.399.399 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409H87.69a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.136 0a.398.398 0 0 1-.387.409h-5.068a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Zm-10.135 0a.399.399 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409H37.01a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.388.409h-5.068a.398.398 0 0 1-.387-.409c0-.226.173-.408.387-.408h5.068c.214 0 .388.183.388.408Zm-10.136 0a.398.398 0 0 1-.387.409H6.603a.398.398 0 0 1-.388-.409c0-.226.174-.408.388-.408h5.068c.214 0 .387.183.387.408Z" fill="#D6D6D6" fill-rule="evenodd"></path><circle cx="65" cy="65" opacity=".5" r="64" stroke="#B6B6BD" stroke-dasharray="5.69 5.69" stroke-linecap="round" stroke-width=".854"></circle><g clip-path="url(#a)" stroke="#169FCC" stroke-miterlimit="10" stroke-width="1.42"><path d="m33.523 104.868-5.72-.695a1.214 1.214 0 0 1-.766-.386 1.182 1.182 0 0 1-.312-.788v-7.448c0-.095.038-.186.106-.253a.365.365 0 0 1 .256-.104l5.254-.263M61.471 22.733a1.761 1.761 0 0 1 1.45.235 49.628 49.628 0 0 1 15.613 17.6 48.797 48.797 0 0 1 5.65 22.702 47.236 47.236 0 0 1-.333 5.325 41.34 41.34 0 0 0-12.501-.441 48.503 48.503 0 0 0-1.813-23.734 49.117 49.117 0 0 0-12.91-20.119c1.602-.591 3.223-1.136 4.844-1.568Z"></path><path d="M71.35 68.154a39.493 39.493 0 0 0-10.813 3.757 51.298 51.298 0 0 0 3.251-18.062c0-9.392-4.939-19.179-9.783-27.237-.257-.432 0-1.616 2.642-2.32"></path><path d="M56.236 78.58a13.605 13.605 0 0 0-4.29-9.289 14.017 14.017 0 0 0-9.622-3.786 9.617 9.617 0 0 1-6.456-2.446 9.341 9.341 0 0 1-3.079-6.1l-.286-4.256c3.09 0 9.46 4.105 13.216 4.866 3.757.76 8.21.253 11.862 3.437a13.303 13.303 0 0 1 4.357 6.575"></path><path d="M68.594 75.442c-3.432 6.95-7.914 11.59-14.303 16.033a47.076 47.076 0 0 1-21.702 8.058v-4.696c11.642-4.809 22.208-11.806 27.948-22.88"></path><path d="M76.499 84.815a46.939 46.939 0 0 1-17.392 14.511 50.925 50.925 0 0 1-22.885 5.457c-2.317 0-3.662.47-3.662-.695v-4.555"></path><path d="M83.85 68.595c22.304 16.22 4.044 39.25-19.652 37.663.954-.939 29.95-22.222-3.661-34.3"></path><path d="M84.184 58.47c13.607 0 25.746 26.242 17.383 30.995-1.182-17.508-17.716-20.87-17.716-20.87"></path></g><defs><clipPath id="a"><path d="M0 0h79v85H0z" fill="#fff" transform="translate(26 22)"></path></clipPath></defs>',5)];function Xt(o,a){return e.openBlock(),e.createElementBlock("svg",Wt,qt)}const Yt=U(Gt,[["render",Xt]]),He=o=>(e.pushScopeId("data-v-5cbccc66"),o=o(),e.popScopeId(),o),Jt={class:"kong-ui-app-error"},Qt={class:"banana-icon"},ea={class:"kong-ui-app-error-content"},ta=He(()=>e.createElementVNode("h2",null,"An unexpected error has occurred",-1)),aa=He(()=>e.createElementVNode("p",null,[e.createTextVNode("Go back to the previous page or "),e.createElementVNode("a",{href:"/"},"return home"),e.createTextVNode(".")],-1)),na=U(e.defineComponent({__name:"AppError",setup(o){return(a,n)=>(e.openBlock(),e.createElementBlock("section",Jt,[e.createElementVNode("div",Qt,[e.createVNode(Yt)]),e.createElementVNode("div",ea,[e.renderSlot(a.$slots,"default",{},()=>[ta,aa],!0)])]))}}),[["__scopeId","data-v-5cbccc66"]]),oa={class:"kong-ui-app-navbar"},ra={class:"header-content"},ia={class:"mobile-header-left"},ca={key:0,class:"app-navbar-logo"},sa={class:"navbar-content"},la={class:"navbar-content-left"},da={class:"navbar-content-center"},ua={class:"navbar-content-right"},ze=U(e.defineComponent({__name:"AppNavbar",props:{topOffset:{type:Number,default:0},leftOffset:{type:Number,default:240},zIndex:{type:Number,default:3}},setup(o){const a=o;e.useCssVars(c=>({d96d0598:f.value.top,"05b18f8e":f.value.zIndex,"543b3ff0":f.value.left,"247c8fd0":d.marginRight,"278e63f0":d.width}));const n=e.useSlots(),r=e.computed(()=>!!n.logo),d=e.reactive({marginRight:"0",width:"0"});e.onMounted(()=>{var c,p;(p=(c=document==null?void 0:document.querySelector(".kong-ui-app-navbar .app-navbar-logo"))==null?void 0:c.children)!=null&&p.length?(d.marginRight="32px",d.width="calc(240px - 32px)"):(d.marginRight="0",d.width="0")});const f=e.computed(()=>({top:a.topOffset?`${a.topOffset}px`:"0",left:a.leftOffset?`${a.leftOffset}px`:"0",zIndex:a.zIndex}));return(c,p)=>(e.openBlock(),e.createElementBlock("header",oa,[e.createElementVNode("div",ra,[e.createElementVNode("div",ia,[e.renderSlot(c.$slots,"mobile-sidebar-toggle"),e.renderSlot(c.$slots,"mobile-logo")]),r.value?(e.openBlock(),e.createElementBlock("div",ca,[e.renderSlot(c.$slots,"logo")])):e.createCommentVNode("",!0),e.createElementVNode("div",sa,[e.createElementVNode("div",la,[e.renderSlot(c.$slots,"left")]),e.createElementVNode("div",da,[e.renderSlot(c.$slots,"center")]),e.createElementVNode("div",ua,[e.renderSlot(c.$slots,"right")])])])]))}}),[["__scopeId","data-v-beca6ea9"]]),fa=["title"],Ie=99,ma=U(e.defineComponent({__name:"ItemBadge",props:{count:{type:Number,required:!0,default:void 0}},setup(o){const a=o,n=e.computed(()=>a.count?a.count>Ie?`${Ie}+`:a.count.toString():"");return(r,d)=>n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"item-badge",title:(o.count||0)>Ie?String(o.count):void 0},e.toDisplayString(n.value),9,fa)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-912b1a1b"]]),pa=["data-testid"],ba=["aria-controls","aria-expanded","href","target","onClick","onKeypress"],ha={key:0,class:"sidebar-item-icon"},ga={class:"sidebar-item-name-container"},va={class:"sidebar-item-name has-tooltip"},ya={key:2,class:"sidebar-item-label truncate-text truncate-18"},ka=["id"],Ue=U(e.defineComponent({__name:"SidebarItem",props:{item:{type:Object,required:!0},subnavItem:{type:Boolean,default:!1}},emits:["click"],setup(o,{emit:a}){const n=o,r=e.computed(()=>typeof n.item.to!="string"?!1:!!n.item.newWindow||!!n.item.external||n.item.to.startsWith("http")),d=e.computed(()=>!n.item.to||typeof n.item.to!="string"||!n.item.newWindow?!1:n.item.newWindow&&(n.item.to.startsWith("http")||n.item.to.startsWith("/"))),f=e.computed(()=>n.subnavItem&&n.item.badgeCount!==void 0),c=h=>{a("click",h)},p=(h,v,B)=>{c(v),typeof B=="function"&&(h.preventDefault(),B())};return(h,v)=>{var _;const B=e.resolveComponent("KIcon"),N=e.resolveComponent("KTooltip"),I=e.resolveComponent("SidebarItem",!0);return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([o.subnavItem?"sidebar-item-secondary":"sidebar-item-primary",{expanded:o.item.expanded},{active:o.item.active}]),"data-testid":o.item.testId?`sidebar-item-${o.item.testId}`:void 0},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value?"div":"router-link"),{custom:r.value?void 0:!0,to:!r.value&&!d.value?o.item.to:void 0},{default:e.withCtx(C=>{var j,V;return[e.createElementVNode("a",{"aria-controls":(j=o.item.items)!=null&&j.length&&o.item.expanded?`subnav-${o.item.key}`:void 0,"aria-expanded":(V=o.item.items)!=null&&V.length&&o.item.expanded?!0:void 0,class:e.normalizeClass(["sidebar-item-link",{"sidebar-item-external-link":d.value,"router-link":!r.value}]),href:r.value?String(o.item.to||"#"):C==null?void 0:C.href,target:d.value?"_blank":void 0,onClick:x=>p(x,o.item,C==null?void 0:C.navigate),onKeypress:e.withKeys(x=>p(x,o.item,C==null?void 0:C.navigate),["enter"])},[e.createElementVNode("div",{class:e.normalizeClass(["sidebar-item-display",{"has-label":!!o.item.label&&o.item.expanded,"has-badge":f.value}])},[o.item.icon?(e.openBlock(),e.createElementBlock("div",ha,[e.createVNode(B,{icon:String(o.item.icon),size:"20"},null,8,["icon"])])):e.createCommentVNode("",!0),e.createElementVNode("div",ga,[(o.subnavItem?o.item.name.length<25:o.item.name.length<18)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["sidebar-item-name truncate-text",[o.subnavItem?"has-badge-max-width truncate-24":"truncate-17"]])},e.toDisplayString(o.item.name),3)):(e.openBlock(),e.createBlock(N,{key:1,class:"sidebar-item-tooltip",label:o.item.name,placement:"right","position-fixed":""},{default:e.withCtx(()=>[e.createElementVNode("div",va,[e.createElementVNode("span",{class:e.normalizeClass(["truncate-text",[o.subnavItem?"truncate-18":"truncate-17",{"has-badge-max-width":f.value}]])},e.toDisplayString(o.item.name),3)])]),_:1},8,["label"])),o.item.label&&o.item.expanded?(e.openBlock(),e.createElementBlock("div",ya,e.toDisplayString(o.item.label),1)):e.createCommentVNode("",!0)]),f.value?(e.openBlock(),e.createBlock(ma,{key:1,count:o.item.badgeCount},null,8,["count"])):e.createCommentVNode("",!0)],2)],42,ba)]}),_:1},8,["custom","to"])),(_=o.item.items)!=null&&_.length&&o.item.expanded?(e.openBlock(),e.createElementBlock("ul",{key:0,id:`subnav-${o.item.key}`,class:"level-secondary"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.item.items,C=>(e.openBlock(),e.createBlock(I,{key:C.name,item:C,"subnav-item":!0,onClick:j=>c(C)},null,8,["item","onClick"]))),128))],8,ka)):e.createCommentVNode("",!0)],10,pa)}}}),[["__scopeId","data-v-34211277"]]);/*!
|
|
2
2
|
* tabbable 6.2.0
|
|
3
3
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
-
*/var Ge=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],he=Ge.join(","),We=typeof Element>"u",J=We?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ge=!We&&Element.prototype.getRootNode?function(o){var a;return o==null||(a=o.getRootNode)===null||a===void 0?void 0:a.call(o)}:function(o){return o==null?void 0:o.ownerDocument},ve=function o(a,n){var r;n===void 0&&(n=!0);var d=a==null||(r=a.getAttribute)===null||r===void 0?void 0:r.call(a,"inert"),f=d===""||d==="true",c=f||n&&a&&o(a.parentNode);return c},
|
|
4
|
+
*/var Ge=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],he=Ge.join(","),We=typeof Element>"u",J=We?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ge=!We&&Element.prototype.getRootNode?function(o){var a;return o==null||(a=o.getRootNode)===null||a===void 0?void 0:a.call(o)}:function(o){return o==null?void 0:o.ownerDocument},ve=function o(a,n){var r;n===void 0&&(n=!0);var d=a==null||(r=a.getAttribute)===null||r===void 0?void 0:r.call(a,"inert"),f=d===""||d==="true",c=f||n&&a&&o(a.parentNode);return c},wa=function(a){var n,r=a==null||(n=a.getAttribute)===null||n===void 0?void 0:n.call(a,"contenteditable");return r===""||r==="true"},qe=function(a,n,r){if(ve(a))return[];var d=Array.prototype.slice.apply(a.querySelectorAll(he));return n&&J.call(a,he)&&d.unshift(a),d=d.filter(r),d},Xe=function o(a,n,r){for(var d=[],f=Array.from(a);f.length;){var c=f.shift();if(!ve(c,!1))if(c.tagName==="SLOT"){var p=c.assignedElements(),h=p.length?p:c.children,v=o(h,!0,r);r.flatten?d.push.apply(d,v):d.push({scopeParent:c,candidates:v})}else{var B=J.call(c,he);B&&r.filter(c)&&(n||!a.includes(c))&&d.push(c);var N=c.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(c),I=!ve(N,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c));if(N&&I){var _=o(N===!0?c.children:N.children,!0,r);r.flatten?d.push.apply(d,_):d.push({scopeParent:c,candidates:_})}else f.unshift.apply(f,c.children)}}return d},Ye=function(a){return!isNaN(parseInt(a.getAttribute("tabindex"),10))},Q=function(a){if(!a)throw new Error("No node provided");return a.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(a.tagName)||wa(a))&&!Ye(a)?0:a.tabIndex},_a=function(a,n){var r=Q(a);return r<0&&n&&!Ye(a)?0:r},Sa=function(a,n){return a.tabIndex===n.tabIndex?a.documentOrder-n.documentOrder:a.tabIndex-n.tabIndex},Je=function(a){return a.tagName==="INPUT"},Ca=function(a){return Je(a)&&a.type==="hidden"},Na=function(a){var n=a.tagName==="DETAILS"&&Array.prototype.slice.apply(a.children).some(function(r){return r.tagName==="SUMMARY"});return n},Ea=function(a,n){for(var r=0;r<a.length;r++)if(a[r].checked&&a[r].form===n)return a[r]},Ta=function(a){if(!a.name)return!0;var n=a.form||ge(a),r=function(p){return n.querySelectorAll('input[type="radio"][name="'+p+'"]')},d;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")d=r(window.CSS.escape(a.name));else try{d=r(a.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var f=Ea(d,a.form);return!f||f===a},Ba=function(a){return Je(a)&&a.type==="radio"},Ia=function(a){return Ba(a)&&!Ta(a)},$a=function(a){var n,r=a&&ge(a),d=(n=r)===null||n===void 0?void 0:n.host,f=!1;if(r&&r!==a){var c,p,h;for(f=!!((c=d)!==null&&c!==void 0&&(p=c.ownerDocument)!==null&&p!==void 0&&p.contains(d)||a!=null&&(h=a.ownerDocument)!==null&&h!==void 0&&h.contains(a));!f&&d;){var v,B,N;r=ge(d),d=(v=r)===null||v===void 0?void 0:v.host,f=!!((B=d)!==null&&B!==void 0&&(N=B.ownerDocument)!==null&&N!==void 0&&N.contains(d))}}return f},Qe=function(a){var n=a.getBoundingClientRect(),r=n.width,d=n.height;return r===0&&d===0},Oa=function(a,n){var r=n.displayCheck,d=n.getShadowRoot;if(getComputedStyle(a).visibility==="hidden")return!0;var f=J.call(a,"details>summary:first-of-type"),c=f?a.parentElement:a;if(J.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof d=="function"){for(var p=a;a;){var h=a.parentElement,v=ge(a);if(h&&!h.shadowRoot&&d(h)===!0)return Qe(a);a.assignedSlot?a=a.assignedSlot:!h&&v!==a.ownerDocument?a=v.host:a=h}a=p}if($a(a))return!a.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Qe(a);return!1},Aa=function(a){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(a.tagName))for(var n=a.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var d=n.children.item(r);if(d.tagName==="LEGEND")return J.call(n,"fieldset[disabled] *")?!0:!d.contains(a)}return!0}n=n.parentElement}return!1},ye=function(a,n){return!(n.disabled||ve(n)||Ca(n)||Oa(n,a)||Na(n)||Aa(n))},$e=function(a,n){return!(Ia(n)||Q(n)<0||!ye(a,n))},Fa=function(a){var n=parseInt(a.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},xa=function o(a){var n=[],r=[];return a.forEach(function(d,f){var c=!!d.scopeParent,p=c?d.scopeParent:d,h=_a(p,c),v=c?o(d.candidates):p;h===0?c?n.push.apply(n,v):n.push(p):r.push({documentOrder:f,tabIndex:h,item:d,isScope:c,content:v})}),r.sort(Sa).reduce(function(d,f){return f.isScope?d.push.apply(d,f.content):d.push(f.content),d},[]).concat(n)},Da=function(a,n){n=n||{};var r;return n.getShadowRoot?r=Xe([a],n.includeContainer,{filter:$e.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Fa}):r=qe(a,n.includeContainer,$e.bind(null,n)),xa(r)},Va=function(a,n){n=n||{};var r;return n.getShadowRoot?r=Xe([a],n.includeContainer,{filter:ye.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=qe(a,n.includeContainer,ye.bind(null,n)),r},oe=function(a,n){if(n=n||{},!a)throw new Error("No node provided");return J.call(a,he)===!1?!1:$e(n,a)},Ra=Ge.concat("iframe").join(","),Oe=function(a,n){if(n=n||{},!a)throw new Error("No node provided");return J.call(a,Ra)===!1?!1:ye(n,a)};/*!
|
|
5
5
|
* focus-trap 7.5.3
|
|
6
6
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
7
|
-
*/function et(o,a){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);a&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(o,d).enumerable})),n.push.apply(n,r)}return n}function tt(o){for(var a=1;a<arguments.length;a++){var n=arguments[a]!=null?arguments[a]:{};a%2?et(Object(n),!0).forEach(function(r){
|
|
7
|
+
*/function et(o,a){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);a&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(o,d).enumerable})),n.push.apply(n,r)}return n}function tt(o){for(var a=1;a<arguments.length;a++){var n=arguments[a]!=null?arguments[a]:{};a%2?et(Object(n),!0).forEach(function(r){La(o,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(n,r))})}return o}function La(o,a,n){return a=Pa(a),a in o?Object.defineProperty(o,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[a]=n,o}function Ma(o,a){if(typeof o!="object"||o===null)return o;var n=o[Symbol.toPrimitive];if(n!==void 0){var r=n.call(o,a||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}function Pa(o){var a=Ma(o,"string");return typeof a=="symbol"?a:String(a)}var at={activateTrap:function(a,n){if(a.length>0){var r=a[a.length-1];r!==n&&r.pause()}var d=a.indexOf(n);d===-1||a.splice(d,1),a.push(n)},deactivateTrap:function(a,n){var r=a.indexOf(n);r!==-1&&a.splice(r,1),a.length>0&&a[a.length-1].unpause()}},Za=function(a){return a.tagName&&a.tagName.toLowerCase()==="input"&&typeof a.select=="function"},ja=function(a){return(a==null?void 0:a.key)==="Escape"||(a==null?void 0:a.key)==="Esc"||(a==null?void 0:a.keyCode)===27},de=function(a){return(a==null?void 0:a.key)==="Tab"||(a==null?void 0:a.keyCode)===9},Ka=function(a){return de(a)&&!a.shiftKey},Ha=function(a){return de(a)&&a.shiftKey},nt=function(a){return setTimeout(a,0)},ot=function(a,n){var r=-1;return a.every(function(d,f){return n(d)?(r=f,!1):!0}),r},ue=function(a){for(var n=arguments.length,r=new Array(n>1?n-1:0),d=1;d<n;d++)r[d-1]=arguments[d];return typeof a=="function"?a.apply(void 0,r):a},ke=function(a){return a.target.shadowRoot&&typeof a.composedPath=="function"?a.composedPath()[0]:a.target},za=[],Ua=function(a,n){var r=(n==null?void 0:n.document)||document,d=(n==null?void 0:n.trapStack)||za,f=tt({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ka,isKeyBackward:Ha},n),c={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},p,h=function(s,u,m){return s&&s[u]!==void 0?s[u]:f[m||u]},v=function(s,u){var m=typeof(u==null?void 0:u.composedPath)=="function"?u.composedPath():void 0;return c.containerGroups.findIndex(function(g){var k=g.container,E=g.tabbableNodes;return k.contains(s)||(m==null?void 0:m.includes(k))||E.find(function(T){return T===s})})},B=function(s){var u=f[s];if(typeof u=="function"){for(var m=arguments.length,g=new Array(m>1?m-1:0),k=1;k<m;k++)g[k-1]=arguments[k];u=u.apply(void 0,g)}if(u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error("`".concat(s,"` was specified but was not a node, or did not return a node"))}var E=u;if(typeof u=="string"&&(E=r.querySelector(u),!E))throw new Error("`".concat(s,"` as selector refers to no known node"));return E},N=function(){var s=B("initialFocus");if(s===!1)return!1;if(s===void 0||!Oe(s,f.tabbableOptions))if(v(r.activeElement)>=0)s=r.activeElement;else{var u=c.tabbableGroups[0],m=u&&u.firstTabbableNode;s=m||B("fallbackFocus")}if(!s)throw new Error("Your focus-trap needs to have at least one focusable element");return s},I=function(){if(c.containerGroups=c.containers.map(function(s){var u=Da(s,f.tabbableOptions),m=Va(s,f.tabbableOptions),g=u.length>0?u[0]:void 0,k=u.length>0?u[u.length-1]:void 0,E=m.find(function($){return oe($)}),T=m.slice().reverse().find(function($){return oe($)}),F=!!u.find(function($){return Q($)>0});return{container:s,tabbableNodes:u,focusableNodes:m,posTabIndexesFound:F,firstTabbableNode:g,lastTabbableNode:k,firstDomTabbableNode:E,lastDomTabbableNode:T,nextTabbableNode:function(y){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,W=u.indexOf(y);return W<0?ee?m.slice(m.indexOf(y)+1).find(function(L){return oe(L)}):m.slice(0,m.indexOf(y)).reverse().find(function(L){return oe(L)}):u[W+(ee?1:-1)]}}}),c.tabbableGroups=c.containerGroups.filter(function(s){return s.tabbableNodes.length>0}),c.tabbableGroups.length<=0&&!B("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(c.containerGroups.find(function(s){return s.posTabIndexesFound})&&c.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},_=function w(s){if(s!==!1&&s!==r.activeElement){if(!s||!s.focus){w(N());return}s.focus({preventScroll:!!f.preventScroll}),c.mostRecentlyFocusedNode=s,Za(s)&&s.select()}},C=function(s){var u=B("setReturnFocus",s);return u||(u===!1?!1:s)},j=function(s){var u=s.target,m=s.event,g=s.isBackward,k=g===void 0?!1:g;u=u||ke(m),I();var E=null;if(c.tabbableGroups.length>0){var T=v(u,m),F=T>=0?c.containerGroups[T]:void 0;if(T<0)k?E=c.tabbableGroups[c.tabbableGroups.length-1].lastTabbableNode:E=c.tabbableGroups[0].firstTabbableNode;else if(k){var $=ot(c.tabbableGroups,function(re){var me=re.firstTabbableNode;return u===me});if($<0&&(F.container===u||Oe(u,f.tabbableOptions)&&!oe(u,f.tabbableOptions)&&!F.nextTabbableNode(u,!1))&&($=T),$>=0){var y=$===0?c.tabbableGroups.length-1:$-1,ee=c.tabbableGroups[y];E=Q(u)>=0?ee.lastTabbableNode:ee.lastDomTabbableNode}else de(m)||(E=F.nextTabbableNode(u,!1))}else{var W=ot(c.tabbableGroups,function(re){var me=re.lastTabbableNode;return u===me});if(W<0&&(F.container===u||Oe(u,f.tabbableOptions)&&!oe(u,f.tabbableOptions)&&!F.nextTabbableNode(u))&&(W=T),W>=0){var L=W===c.tabbableGroups.length-1?0:W+1,fe=c.tabbableGroups[L];E=Q(u)>=0?fe.firstTabbableNode:fe.firstDomTabbableNode}else de(m)||(E=F.nextTabbableNode(u))}}else E=B("fallbackFocus");return E},V=function(s){var u=ke(s);if(!(v(u,s)>=0)){if(ue(f.clickOutsideDeactivates,s)){p.deactivate({returnFocus:f.returnFocusOnDeactivate});return}ue(f.allowOutsideClick,s)||s.preventDefault()}},x=function(s){var u=ke(s),m=v(u,s)>=0;if(m||u instanceof Document)m&&(c.mostRecentlyFocusedNode=u);else{s.stopImmediatePropagation();var g,k=!0;if(c.mostRecentlyFocusedNode)if(Q(c.mostRecentlyFocusedNode)>0){var E=v(c.mostRecentlyFocusedNode),T=c.containerGroups[E].tabbableNodes;if(T.length>0){var F=T.findIndex(function($){return $===c.mostRecentlyFocusedNode});F>=0&&(f.isKeyForward(c.recentNavEvent)?F+1<T.length&&(g=T[F+1],k=!1):F-1>=0&&(g=T[F-1],k=!1))}}else c.containerGroups.some(function($){return $.tabbableNodes.some(function(y){return Q(y)>0})})||(k=!1);else k=!1;k&&(g=j({target:c.mostRecentlyFocusedNode,isBackward:f.isKeyBackward(c.recentNavEvent)})),_(g||c.mostRecentlyFocusedNode||N())}c.recentNavEvent=void 0},X=function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;c.recentNavEvent=s;var m=j({event:s,isBackward:u});m&&(de(s)&&s.preventDefault(),_(m))},G=function(s){if(ja(s)&&ue(f.escapeDeactivates,s)!==!1){s.preventDefault(),p.deactivate();return}(f.isKeyForward(s)||f.isKeyBackward(s))&&X(s,f.isKeyBackward(s))},H=function(s){var u=ke(s);v(u,s)>=0||ue(f.clickOutsideDeactivates,s)||ue(f.allowOutsideClick,s)||(s.preventDefault(),s.stopImmediatePropagation())},P=function(){if(c.active)return at.activateTrap(d,p),c.delayInitialFocusTimer=f.delayInitialFocus?nt(function(){_(N())}):_(N()),r.addEventListener("focusin",x,!0),r.addEventListener("mousedown",V,{capture:!0,passive:!1}),r.addEventListener("touchstart",V,{capture:!0,passive:!1}),r.addEventListener("click",H,{capture:!0,passive:!1}),r.addEventListener("keydown",G,{capture:!0,passive:!1}),p},R=function(){if(c.active)return r.removeEventListener("focusin",x,!0),r.removeEventListener("mousedown",V,!0),r.removeEventListener("touchstart",V,!0),r.removeEventListener("click",H,!0),r.removeEventListener("keydown",G,!0),p},S=function(s){var u=s.some(function(m){var g=Array.from(m.removedNodes);return g.some(function(k){return k===c.mostRecentlyFocusedNode})});u&&_(N())},A=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(S):void 0,K=function(){A&&(A.disconnect(),c.active&&!c.paused&&c.containers.map(function(s){A.observe(s,{subtree:!0,childList:!0})}))};return p={get active(){return c.active},get paused(){return c.paused},activate:function(s){if(c.active)return this;var u=h(s,"onActivate"),m=h(s,"onPostActivate"),g=h(s,"checkCanFocusTrap");g||I(),c.active=!0,c.paused=!1,c.nodeFocusedBeforeActivation=r.activeElement,u==null||u();var k=function(){g&&I(),P(),K(),m==null||m()};return g?(g(c.containers.concat()).then(k,k),this):(k(),this)},deactivate:function(s){if(!c.active)return this;var u=tt({onDeactivate:f.onDeactivate,onPostDeactivate:f.onPostDeactivate,checkCanReturnFocus:f.checkCanReturnFocus},s);clearTimeout(c.delayInitialFocusTimer),c.delayInitialFocusTimer=void 0,R(),c.active=!1,c.paused=!1,K(),at.deactivateTrap(d,p);var m=h(u,"onDeactivate"),g=h(u,"onPostDeactivate"),k=h(u,"checkCanReturnFocus"),E=h(u,"returnFocus","returnFocusOnDeactivate");m==null||m();var T=function(){nt(function(){E&&_(C(c.nodeFocusedBeforeActivation)),g==null||g()})};return E&&k?(k(C(c.nodeFocusedBeforeActivation)).then(T,T),this):(T(),this)},pause:function(s){if(c.paused||!c.active)return this;var u=h(s,"onPause"),m=h(s,"onPostPause");return c.paused=!0,u==null||u(),R(),K(),m==null||m(),this},unpause:function(s){if(!c.paused||!c.active)return this;var u=h(s,"onUnpause"),m=h(s,"onPostUnpause");return c.paused=!1,u==null||u(),I(),P(),K(),m==null||m(),this},updateContainerElements:function(s){var u=[].concat(s).filter(Boolean);return c.containers=u.map(function(m){return typeof m=="string"?r.querySelector(m):m}),c.active&&I(),K(),this}},p.updateContainerElements(a),p};/*!
|
|
8
8
|
* focus-trap-vue v4.0.1
|
|
9
9
|
* (c) 2023 Eduardo San Martin Morote
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/function yr(o){return o}const Ja={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},Qa=e.defineComponent({props:Object.assign({active:{type:Boolean,default:!0}},Ja),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(o,{slots:a,emit:n}){let r;const d=e.ref(null),f=e.computed(()=>{const m=d.value;return m&&(m instanceof HTMLElement?m:m.$el)});function c(){return r||(r=Ya(f.value,{escapeDeactivates:o.escapeDeactivates,allowOutsideClick:o.allowOutsideClick,returnFocusOnDeactivate:o.returnFocusOnDeactivate,clickOutsideDeactivates:o.clickOutsideDeactivates,onActivate:()=>{n("update:active",!0),n("activate")},onDeactivate:()=>{n("update:active",!1),n("deactivate")},onPostActivate:()=>n("postActivate"),onPostDeactivate:()=>n("postDeactivate"),initialFocus:o.initialFocus,fallbackFocus:o.fallbackFocus,tabbableOptions:o.tabbableOptions,delayInitialFocus:o.delayInitialFocus}))}return e.onMounted(()=>{e.watch(()=>o.active,m=>{m&&f.value?c().activate():r&&(r.deactivate(),(!f.value||f.value.nodeType===Node.COMMENT_NODE)&&(r=null))},{immediate:!0,flush:"post"})}),e.onUnmounted(()=>{r&&r.deactivate(),r=null}),{activate(){c().activate()},deactivate(){r&&r.deactivate()},renderImpl(){if(!a.default)return null;const m=a.default().filter(v=>v.type!==e.Comment);return!m||!m.length||m.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),m):e.cloneVNode(m[0],{ref:d})}}}});function rt(){return{debounce:(a,n)=>{let r;return(...d)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{a(...d)},n)}}}}var ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function en(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var we={exports:{}};we.exports,function(o,a){var n=200,r="__lodash_hash_undefined__",d=9007199254740991,f="[object Arguments]",c="[object Array]",m="[object Boolean]",h="[object Date]",v="[object Error]",B="[object Function]",N="[object GeneratorFunction]",I="[object Map]",w="[object Number]",C="[object Object]",j="[object Promise]",V="[object RegExp]",F="[object Set]",X="[object String]",G="[object Symbol]",H="[object WeakMap]",P="[object ArrayBuffer]",R="[object DataView]",S="[object Float32Array]",A="[object Float64Array]",K="[object Int8Array]",k="[object Int16Array]",s="[object Int32Array]",u="[object Uint8Array]",p="[object Uint8ClampedArray]",g="[object Uint16Array]",_="[object Uint32Array]",E=/[\\^$.*+?()[\]{}|]/g,T=/\w*$/,x=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,y={};y[f]=y[c]=y[P]=y[R]=y[m]=y[h]=y[S]=y[A]=y[K]=y[k]=y[s]=y[I]=y[w]=y[C]=y[V]=y[F]=y[X]=y[G]=y[u]=y[p]=y[g]=y[_]=!0,y[v]=y[B]=y[H]=!1;var ee=typeof ke=="object"&&ke&&ke.Object===Object&&ke,W=typeof self=="object"&&self&&self.Object===Object&&self,L=ee||W||Function("return this")(),fe=a&&!a.nodeType&&a,re=fe&&!0&&o&&!o.nodeType&&o,pe=re&&re.exports===fe;function zn(t,i){return t.set(i[0],i[1]),t}function Un(t,i){return t.add(i),t}function Gn(t,i){for(var l=-1,b=t?t.length:0;++l<b&&i(t[l],l,t)!==!1;);return t}function Wn(t,i){for(var l=-1,b=i.length,$=t.length;++l<b;)t[$+l]=i[l];return t}function lt(t,i,l,b){var $=-1,M=t?t.length:0;for(b&&M&&(l=t[++$]);++$<M;)l=i(l,t[$],$,t);return l}function qn(t,i){for(var l=-1,b=Array(t);++l<t;)b[l]=i(l);return b}function Xn(t,i){return t==null?void 0:t[i]}function dt(t){var i=!1;if(t!=null&&typeof t.toString!="function")try{i=!!(t+"")}catch{}return i}function ut(t){var i=-1,l=Array(t.size);return t.forEach(function(b,$){l[++i]=[$,b]}),l}function xe(t,i){return function(l){return t(i(l))}}function ft(t){var i=-1,l=Array(t.size);return t.forEach(function(b){l[++i]=b}),l}var Yn=Array.prototype,Jn=Function.prototype,Se=Object.prototype,Fe=L["__core-js_shared__"],pt=function(){var t=/[^.]+$/.exec(Fe&&Fe.keys&&Fe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),mt=Jn.toString,Y=Se.hasOwnProperty,Ce=Se.toString,Qn=RegExp("^"+mt.call(Y).replace(E,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bt=pe?L.Buffer:void 0,ht=L.Symbol,gt=L.Uint8Array,eo=xe(Object.getPrototypeOf,Object),to=Object.create,ao=Se.propertyIsEnumerable,no=Yn.splice,vt=Object.getOwnPropertySymbols,oo=bt?bt.isBuffer:void 0,ro=xe(Object.keys,Object),De=se(L,"DataView"),me=se(L,"Map"),Ve=se(L,"Promise"),Re=se(L,"Set"),Le=se(L,"WeakMap"),be=se(Object,"create"),io=ne(De),co=ne(me),so=ne(Ve),lo=ne(Re),uo=ne(Le),yt=ht?ht.prototype:void 0,_t=yt?yt.valueOf:void 0;function te(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var b=t[i];this.set(b[0],b[1])}}function fo(){this.__data__=be?be(null):{}}function po(t){return this.has(t)&&delete this.__data__[t]}function mo(t){var i=this.__data__;if(be){var l=i[t];return l===r?void 0:l}return Y.call(i,t)?i[t]:void 0}function bo(t){var i=this.__data__;return be?i[t]!==void 0:Y.call(i,t)}function ho(t,i){var l=this.__data__;return l[t]=be&&i===void 0?r:i,this}te.prototype.clear=fo,te.prototype.delete=po,te.prototype.get=mo,te.prototype.has=bo,te.prototype.set=ho;function q(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var b=t[i];this.set(b[0],b[1])}}function go(){this.__data__=[]}function vo(t){var i=this.__data__,l=Ne(i,t);if(l<0)return!1;var b=i.length-1;return l==b?i.pop():no.call(i,l,1),!0}function yo(t){var i=this.__data__,l=Ne(i,t);return l<0?void 0:i[l][1]}function _o(t){return Ne(this.__data__,t)>-1}function ko(t,i){var l=this.__data__,b=Ne(l,t);return b<0?l.push([t,i]):l[b][1]=i,this}q.prototype.clear=go,q.prototype.delete=vo,q.prototype.get=yo,q.prototype.has=_o,q.prototype.set=ko;function ie(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var b=t[i];this.set(b[0],b[1])}}function wo(){this.__data__={hash:new te,map:new(me||q),string:new te}}function So(t){return Ee(this,t).delete(t)}function Co(t){return Ee(this,t).get(t)}function No(t){return Ee(this,t).has(t)}function Eo(t,i){return Ee(this,t).set(t,i),this}ie.prototype.clear=wo,ie.prototype.delete=So,ie.prototype.get=Co,ie.prototype.has=No,ie.prototype.set=Eo;function ce(t){this.__data__=new q(t)}function To(){this.__data__=new q}function Bo(t){return this.__data__.delete(t)}function Io(t){return this.__data__.get(t)}function Oo(t){return this.__data__.has(t)}function $o(t,i){var l=this.__data__;if(l instanceof q){var b=l.__data__;if(!me||b.length<n-1)return b.push([t,i]),this;l=this.__data__=new ie(b)}return l.set(t,i),this}ce.prototype.clear=To,ce.prototype.delete=Bo,ce.prototype.get=Io,ce.prototype.has=Oo,ce.prototype.set=$o;function Ao(t,i){var l=Ze(t)||ar(t)?qn(t.length,String):[],b=l.length,$=!!b;for(var M in t)(i||Y.call(t,M))&&!($&&(M=="length"||Jo(M,b)))&&l.push(M);return l}function kt(t,i,l){var b=t[i];(!(Y.call(t,i)&&Nt(b,l))||l===void 0&&!(i in t))&&(t[i]=l)}function Ne(t,i){for(var l=t.length;l--;)if(Nt(t[l][0],i))return l;return-1}function xo(t,i){return t&&wt(i,je(i),t)}function Me(t,i,l,b,$,M,z){var Z;if(b&&(Z=M?b(t,$,M,z):b(t)),Z!==void 0)return Z;if(!Te(t))return t;var Bt=Ze(t);if(Bt){if(Z=qo(t),!i)return Uo(t,Z)}else{var le=ae(t),It=le==B||le==N;if(or(t))return Mo(t,i);if(le==C||le==f||It&&!M){if(dt(t))return M?t:{};if(Z=Xo(It?{}:t),!i)return Go(t,xo(Z,t))}else{if(!y[le])return M?t:{};Z=Yo(t,le,Me,i)}}z||(z=new ce);var Ot=z.get(t);if(Ot)return Ot;if(z.set(t,Z),!Bt)var $t=l?Wo(t):je(t);return Gn($t||t,function(Ke,Be){$t&&(Be=Ke,Ke=t[Be]),kt(Z,Be,Me(Ke,i,l,b,Be,t,z))}),Z}function Fo(t){return Te(t)?to(t):{}}function Do(t,i,l){var b=i(t);return Ze(t)?b:Wn(b,l(t))}function Vo(t){return Ce.call(t)}function Ro(t){if(!Te(t)||er(t))return!1;var i=Tt(t)||dt(t)?Qn:x;return i.test(ne(t))}function Lo(t){if(!Ct(t))return ro(t);var i=[];for(var l in Object(t))Y.call(t,l)&&l!="constructor"&&i.push(l);return i}function Mo(t,i){if(i)return t.slice();var l=new t.constructor(t.length);return t.copy(l),l}function Pe(t){var i=new t.constructor(t.byteLength);return new gt(i).set(new gt(t)),i}function Po(t,i){var l=i?Pe(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.byteLength)}function Zo(t,i,l){var b=i?l(ut(t),!0):ut(t);return lt(b,zn,new t.constructor)}function jo(t){var i=new t.constructor(t.source,T.exec(t));return i.lastIndex=t.lastIndex,i}function Ko(t,i,l){var b=i?l(ft(t),!0):ft(t);return lt(b,Un,new t.constructor)}function Ho(t){return _t?Object(_t.call(t)):{}}function zo(t,i){var l=i?Pe(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.length)}function Uo(t,i){var l=-1,b=t.length;for(i||(i=Array(b));++l<b;)i[l]=t[l];return i}function wt(t,i,l,b){l||(l={});for(var $=-1,M=i.length;++$<M;){var z=i[$],Z=b?b(l[z],t[z],z,l,t):void 0;kt(l,z,Z===void 0?t[z]:Z)}return l}function Go(t,i){return wt(t,St(t),i)}function Wo(t){return Do(t,je,St)}function Ee(t,i){var l=t.__data__;return Qo(i)?l[typeof i=="string"?"string":"hash"]:l.map}function se(t,i){var l=Xn(t,i);return Ro(l)?l:void 0}var St=vt?xe(vt,Object):cr,ae=Vo;(De&&ae(new De(new ArrayBuffer(1)))!=R||me&&ae(new me)!=I||Ve&&ae(Ve.resolve())!=j||Re&&ae(new Re)!=F||Le&&ae(new Le)!=H)&&(ae=function(t){var i=Ce.call(t),l=i==C?t.constructor:void 0,b=l?ne(l):void 0;if(b)switch(b){case io:return R;case co:return I;case so:return j;case lo:return F;case uo:return H}return i});function qo(t){var i=t.length,l=t.constructor(i);return i&&typeof t[0]=="string"&&Y.call(t,"index")&&(l.index=t.index,l.input=t.input),l}function Xo(t){return typeof t.constructor=="function"&&!Ct(t)?Fo(eo(t)):{}}function Yo(t,i,l,b){var $=t.constructor;switch(i){case P:return Pe(t);case m:case h:return new $(+t);case R:return Po(t,b);case S:case A:case K:case k:case s:case u:case p:case g:case _:return zo(t,b);case I:return Zo(t,b,l);case w:case X:return new $(t);case V:return jo(t);case F:return Ko(t,b,l);case G:return Ho(t)}}function Jo(t,i){return i=i??d,!!i&&(typeof t=="number"||O.test(t))&&t>-1&&t%1==0&&t<i}function Qo(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}function er(t){return!!pt&&pt in t}function Ct(t){var i=t&&t.constructor,l=typeof i=="function"&&i.prototype||Se;return t===l}function ne(t){if(t!=null){try{return mt.call(t)}catch{}try{return t+""}catch{}}return""}function tr(t){return Me(t,!0,!0)}function Nt(t,i){return t===i||t!==t&&i!==i}function ar(t){return nr(t)&&Y.call(t,"callee")&&(!ao.call(t,"callee")||Ce.call(t)==f)}var Ze=Array.isArray;function Et(t){return t!=null&&rr(t.length)&&!Tt(t)}function nr(t){return ir(t)&&Et(t)}var or=oo||sr;function Tt(t){var i=Te(t)?Ce.call(t):"";return i==B||i==N}function rr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=d}function Te(t){var i=typeof t;return!!t&&(i=="object"||i=="function")}function ir(t){return!!t&&typeof t=="object"}function je(t){return Et(t)?Ao(t):Lo(t)}function cr(){return[]}function sr(){return!1}o.exports=tr}(we,we.exports);var tn=we.exports;const an=en(tn),nn={key:0,class:"sidebar-header"},on={class:"sidebar-content-container"},rn={key:0,class:"sidebar-top"},cn={"aria-label":"Main menu"},sn={key:0,class:"level-primary top-items"},ln={key:1,class:"sidebar-level-divider",role:"separator"},dn={key:2,class:"level-primary bottom-items"},un={class:"sidebar-footer"},fn=e.defineComponent({__name:"AppSidebar",props:{topItems:{type:Array,default:()=>[]},bottomItems:{type:Array,default:()=>[]},headerHeight:{type:Number,default:60},topOffset:{type:Number,default:0},zIndex:{type:Number,default:3},open:{type:Boolean,default:!1},mobileEnabled:{type:Boolean,default:!1},mobileTopOffset:{type:Number,default:0},mobileHeaderVisible:{type:Boolean,default:!1},mobileCloseDelay:{type:Number,default:350},mobileOverlay:{type:Boolean,default:!0},mobileOverlayZIndex:{type:Number,default:null},mobileOverlayCloseOnClick:{type:Boolean,default:!0}},emits:["click","toggle"],setup(o,{emit:a}){const n=o;e.useCssVars(s=>({"2c5b02a5":c.value.mobileHeight,"19baf097":c.value.mobileTop,"01f7cae3":o.zIndex,e9cb373a:c.value.height,e991d0ce:c.value.top,"8a4ad026":h.value.marginTop,"28946a7f":m.value.display,"3e6b7496":m.value.minHeight,"92ecef30":v.value.top,"16fef085":v.value.zIndex}));const r=e.useSlots(),d=e.computed(()=>!!r.header),f=e.computed(()=>!!r.top),c=e.computed(()=>({mobileTop:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:n.topOffset?`${n.topOffset}px`:"0",top:n.topOffset?`${n.topOffset}px`:"0",mobileHeight:n.mobileTopOffset&&n.mobileEnabled?`calc(100% - ${n.mobileTopOffset}px)`:"100%",height:n.topOffset?`calc(100% - ${n.topOffset}px)`:"100%"})),m=e.computed(()=>({display:!n.mobileHeaderVisible&&n.mobileEnabled?"none":"flex",minHeight:`${n.headerHeight}px`})),h=e.computed(()=>({marginTop:d.value?`${n.headerHeight}px`:"0"})),v=e.computed(()=>({top:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:"0",zIndex:n.mobileOverlayZIndex!==null?n.mobileOverlayZIndex:n.zIndex>1?n.zIndex-1:1})),B=s=>an(s).map(p=>{var g,_,E;if(p){(!p.key||!((g=p.key)!=null&&g.trim()))&&(p.key=String(p.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-")),(!p.testId||!((_=p.testId)!=null&&_.trim()))&&(p.testId=String(p.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"));for(const T of p.items||[])T.parentKey=p.key,(!T.testId||!((E=T.testId)!=null&&E.trim()))&&(T.testId=String(T.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"))}return p}),N=e.computed(()=>n.topItems.length?B(n.topItems):[]),I=e.computed(()=>n.bottomItems.length?B(n.bottomItems):[]),w=e.ref(n.open),C=s=>{var u,p;w.value!==s&&(w.value=s,a("toggle",s)),s?(u=document==null?void 0:document.body)==null||u.classList.add("kong-ui-app-sidebar-open"):(p=document==null?void 0:document.body)==null||p.classList.remove("kong-ui-app-sidebar-open"),V.value=!1},j=()=>{n.mobileOverlayCloseOnClick&&C(!1)},V=e.ref(!1),F=s=>{V.value=!0,a("click",s),setTimeout(()=>{C(!1)},n.mobileCloseDelay)};e.watch(()=>n.open,s=>{C(s)});const{debounce:X}=rt(),G=X(()=>{w.value&&H.value!==(window==null?void 0:window.innerWidth)&&(H.value=window==null?void 0:window.innerWidth,C(!1))},200),H=e.ref(),P=e.ref(!1),R=e.ref(),S=()=>{P.value||(P.value=!0,clearTimeout(R.value),R.value=setTimeout(()=>P.value=!1,1300))},A=e.ref(null),K=e.computed(()=>w.value&&n.mobileEnabled),k=async s=>{var u,p;s?(await e.nextTick(),await new Promise(g=>setTimeout(g,300)),(u=A.value)==null||u.activate()):(p=A.value)==null||p.deactivate()};return e.watch(K,async s=>{s?await k(!0):await k(!1)},{immediate:!0}),e.onMounted(()=>{H.value=window==null?void 0:window.innerWidth,window.addEventListener("resize",G),window.addEventListener("resize",S)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",G),window.removeEventListener("resize",S)}),(s,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value&&o.mobileOverlay&&o.mobileEnabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"kong-ui-app-sidebar-overlay",onClick:j})):e.createCommentVNode("",!0),e.createVNode(e.unref(Qa),{ref_key:"focusTrap",ref:A,active:!1,"allow-outside-click":"","fallback-focus":".kong-ui-app-sidebar"},{default:e.withCtx(()=>[e.createElementVNode("aside",{class:e.normalizeClass(["kong-ui-app-sidebar",{"sidebar-open":w.value,"no-sidebar-header":!d.value,"mobile-header-hidden":o.mobileEnabled&&(!d.value||!o.mobileHeaderVisible),"mobile-disabled":!o.mobileEnabled,"disable-transitions":P.value}]),tabindex:"-1"},[d.value?(e.openBlock(),e.createElementBlock("div",nn,[e.renderSlot(s.$slots,"header",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",on,[f.value?(e.openBlock(),e.createElementBlock("div",rn,[e.renderSlot(s.$slots,"top",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("nav",cn,[N.value.length?(e.openBlock(),e.createElementBlock("ul",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,p=>(e.openBlock(),e.createBlock(Ue,{key:p.name,item:p,onClick:F},null,8,["item"]))),128))])):e.createCommentVNode("",!0),N.value.length&&I.value.length?(e.openBlock(),e.createElementBlock("div",ln)):e.createCommentVNode("",!0),I.value.length?(e.openBlock(),e.createElementBlock("ul",dn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,p=>(e.openBlock(),e.createBlock(Ue,{key:p.name,item:p,onClick:F},null,8,["item"]))),128))])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",un,[e.renderSlot(s.$slots,"footer",{},void 0,!0)])],2)]),_:3},512)],64))}}),_r="",kr="",it=U(fn,[["__scopeId","data-v-4f0a752f"]]),Ae=o=>(e.pushScopeId("data-v-00a332e0"),o=o(),e.popScopeId(),o),pn=["aria-label","onClick"],mn=[Ae(()=>e.createElementVNode("span",{class:"line"},null,-1)),Ae(()=>e.createElementVNode("span",{class:"line"},null,-1)),Ae(()=>e.createElementVNode("span",{class:"line"},null,-1))],bn=e.defineComponent({__name:"SidebarToggle",props:{active:{type:Boolean,default:!1}},emits:["toggle"],setup(o,{emit:a}){const n=o,r=e.ref(n.active||!1),d=()=>{r.value=!r.value,a("toggle",r.value)};return e.watch(()=>n.active,f=>{r.value=f}),(f,c)=>(e.openBlock(),e.createElementBlock("a",{"aria-haspopup":"true","aria-label":r.value?"Close Main Menu":"Open Main Menu",class:e.normalizeClass(["sidebar-menu-toggle",{active:r.value}]),href:"#",role:"button",onClick:e.withModifiers(d,["prevent"])},mn,10,pn))}}),Nr="",ct=U(bn,[["__scopeId","data-v-00a332e0"]]),hn="#ffffff",gn="#000933",vn="#000933",yn="#ffffff",_n="0px",kn="4px",wn=o=>(e.pushScopeId("data-v-f81adf4e"),o=o(),e.popScopeId(),o),Sn={id:"kong-ui-app-layout-notification"},Cn={class:"mobile-logo"},Nn={key:0,class:"navbar-logo"},En={class:"kong-ui-app-layout-main","data-testid":"kong-ui-app-layout-main"},Tn={class:"kong-ui-app-layout-content"},Bn={class:"kong-ui-app-layout-content-inner"},In=wn(()=>e.createElementVNode("div",{id:"kong-ui-app-layout-teleport-default-slot"},null,-1)),On=e.defineComponent({__name:"AppLayout",props:{hideDefaultSlot:{type:Boolean,default:!1},navbarHidden:{type:Boolean,default:!1},sidebarHidden:{type:Boolean,default:!1},sidebarOpen:{type:Boolean,default:!1},sidebarTopItems:{type:Array,default:()=>[]},sidebarBottomItems:{type:Array,default:()=>[]},theme:{type:String,default:"light",validator:o=>["light","dark"].includes(o)}},emits:["sidebar-click"],setup(o,{emit:a}){const n=o;e.useCssVars(S=>({"3c1b64a7":V.value,e1fe5bc6:F.value,"74505bb5":j.value,24707019:X.value,"1f0d0dcc":G.value}));const r=e.useSlots(),d=e.reactive({navbarLeft:e.computed(()=>!!r["navbar-left"]),navbarCenter:e.computed(()=>!!r["navbar-center"]),navbarRight:e.computed(()=>!!r["navbar-right"]),navbarLogo:e.computed(()=>!!r["navbar-logo"]),navbarMobileLogo:e.computed(()=>!!r["navbar-mobile-logo"]),sidebarHeader:e.computed(()=>!!r["sidebar-header"]),sidebarTop:e.computed(()=>!!r["sidebar-top"]),sidebarFooter:e.computed(()=>!!r["sidebar-footer"])}),f=e.computed(()=>n.hideDefaultSlot),c=e.reactive({hidden:e.computed(()=>n.navbarHidden)}),m=e.reactive({topItems:e.computed(()=>n.sidebarTopItems),bottomItems:e.computed(()=>n.sidebarBottomItems),open:e.computed(()=>n.sidebarOpen),hidden:e.computed(()=>n.sidebarHidden)}),h=S=>{a("sidebar-click",S)},v=e.ref(!1),B=S=>{v.value=S};e.watchEffect(()=>{v.value=e.toRef(m,"open").value||!1});const N=e.ref(0),I=e.ref(60),w=e.ref(0),C=e.computed(()=>c.hidden?w.value:I.value+w.value),j=e.computed(()=>n.theme==="light"?vn:yn),V=e.computed(()=>n.theme==="light"?hn:gn),F=e.computed(()=>n.theme==="light"?"var(--kong-ui-app-layout-main-box-shadow, -30px 174px 250px #0023db)":"none"),X=e.computed(()=>`${C.value}px`),G=e.computed(()=>m.hidden||c.hidden?_n:kn),{debounce:H}=rt(),P=H((S=!1)=>{if(S||N.value!==(window==null?void 0:window.innerWidth)){N.value=window==null?void 0:window.innerWidth;const A=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");A&&(w.value=A.offsetHeight)}},200),R=e.ref();return e.onMounted(()=>{var A,K;(A=document==null?void 0:document.body)==null||A.classList.add("kong-ui-app-layout-body"),(K=document==null?void 0:document.documentElement)==null||K.classList.add("kong-ui-app-layout-html"),N.value=window==null?void 0:window.innerWidth,P(!0);const S=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");S&&(R.value=new ResizeObserver(k=>{window.requestAnimationFrame(()=>{if(!(!Array.isArray(k)||!k.length))for(const s of k){const u=s.contentRect.height;w.value!==u&&(w.value=u)}})}),R.value.observe(S)),window.addEventListener("resize",P)}),e.onBeforeUnmount(()=>{R.value&&R.value.disconnect(),window.removeEventListener("resize",P)}),(S,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-app-layout",[{"navbar-hidden":c.hidden},{"sidebar-hidden":m.hidden}]])},[e.createElementVNode("div",Sn,[e.renderSlot(S.$slots,"notification",{},void 0,!0)]),c.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze,{key:String(m.hidden),"left-offset":m.hidden?0:void 0,"top-offset":w.value},e.createSlots({"mobile-sidebar-toggle":e.withCtx(()=>[m.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ct,{key:0,active:v.value,onToggle:B},null,8,["active"]))]),_:2},[d.navbarMobileLogo?{name:"mobile-logo",fn:e.withCtx(()=>[e.createElementVNode("div",Cn,[e.renderSlot(S.$slots,"navbar-mobile-logo",{},void 0,!0)])]),key:"0"}:void 0,d.navbarLogo?{name:"logo",fn:e.withCtx(()=>[m.hidden?(e.openBlock(),e.createElementBlock("div",Nn,[e.renderSlot(S.$slots,"navbar-logo",{},void 0,!0)])):e.createCommentVNode("",!0)]),key:"1"}:void 0,d.navbarLeft?{name:"left",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-left",{},void 0,!0)]),key:"2"}:void 0,d.navbarCenter?{name:"center",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-center",{},void 0,!0)]),key:"3"}:void 0,d.navbarRight?{name:"right",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-right",{},void 0,!0)]),key:"4"}:void 0]),1032,["left-offset","top-offset"])),m.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(it,{key:1,"bottom-items":m.bottomItems,"header-height":I.value,"mobile-enabled":"","mobile-header-visible":!1,"mobile-top-offset":C.value,open:v.value,"top-items":m.topItems,"top-offset":w.value,onClick:h,onToggle:B},e.createSlots({_:2},[d.sidebarHeader?{name:"header",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-header",{},void 0,!0)]),key:"0"}:void 0,d.sidebarTop?{name:"top",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-top",{},void 0,!0)]),key:"1"}:void 0,d.sidebarFooter?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-footer",{},void 0,!0)]),key:"2"}:void 0]),1032,["bottom-items","header-height","mobile-top-offset","open","top-items","top-offset"])),e.createElementVNode("main",En,[e.createElementVNode("div",Tn,[e.createElementVNode("div",Bn,[In,e.renderSlot(S.$slots,"app-error",{},void 0,!0),f.value?e.createCommentVNode("",!0):e.renderSlot(S.$slots,"default",{key:0},void 0,!0)])])])],2))}}),Er="",Tr="",st=U(On,[["__scopeId","data-v-f81adf4e"]]),$n=o=>(e.pushScopeId("data-v-d7e33427"),o=o(),e.popScopeId(),o),An={class:"kong-ui-app-page-header"},xn={key:0,class:"page-header-breadcrumbs","data-testid":"page-header-breadcrumbs"},Fn=$n(()=>e.createElementVNode("span",{class:"page-header-breadcrumb-divider"},"/",-1)),Dn={class:"page-header-title-section"},Vn={class:"page-header-title-wrapper"},Rn={key:0,class:"page-header-title-before","data-testid":"page-header-title-before"},Ln=["title"],Mn={key:1,class:"page-header-title-after","data-testid":"page-header-title-after"},Pn={key:0,class:"page-header-actions","data-testid":"page-header-actions"},Zn={key:1,class:"page-header-section-below","data-testid":"page-header-section-below"},jn=e.defineComponent({__name:"AppPageHeader",props:{title:{type:String,required:!0},breadcrumbs:{type:Array,default:()=>[]}},setup(o){const a=o,n=e.computed(()=>{var f;return!!((f=a.breadcrumbs)!=null&&f.length)}),r=(f,c)=>f.key||`breadcrumb-${c}`,d=e.computed(()=>a.breadcrumbs.map((f,c)=>`icon-${r(f,c)}`)||[]);return(f,c)=>{const m=e.resolveComponent("KBreadcrumbs");return e.openBlock(),e.createElementBlock("div",An,[n.value?(e.openBlock(),e.createElementBlock("div",xn,[e.createVNode(m,{items:o.breadcrumbs},e.createSlots({divider:e.withCtx(()=>[Fn]),_:2},[e.renderList(d.value,h=>({name:h,fn:e.withCtx(()=>[e.renderSlot(f.$slots,h,{},void 0,!0)])}))]),1032,["items"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Dn,[e.createElementVNode("div",Vn,[f.$slots["title-before"]?(e.openBlock(),e.createElementBlock("div",Rn,[e.renderSlot(f.$slots,"title-before",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("h1",{class:"page-header-title","data-testid":"page-header-title",title:o.title},e.toDisplayString(o.title),9,Ln),f.$slots["title-after"]?(e.openBlock(),e.createElementBlock("div",Mn,[e.renderSlot(f.$slots,"title-after",{},void 0,!0)])):e.createCommentVNode("",!0)]),f.$slots.actions?(e.openBlock(),e.createElementBlock("div",Pn,[e.renderSlot(f.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),f.$slots.below?(e.openBlock(),e.createElementBlock("div",Zn,[e.renderSlot(f.$slots,"below",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),Br="",Kn=U(jn,[["__scopeId","data-v-d7e33427"]]),Hn={install:(o,a={})=>{o.component(a.name||"AppLayout",st)}};D.AccountDropdown=xt,D.AppAboutSection=Gt,D.AppError=ra,D.AppLayout=st,D.AppNavbar=ze,D.AppPageHeader=Kn,D.AppSidebar=it,D.SidebarToggle=ct,D.default=Hn,Object.defineProperties(D,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
11
|
+
*/function ir(o){return o}const Ga={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},Wa=e.defineComponent({props:Object.assign({active:{type:Boolean,default:!0}},Ga),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(o,{slots:a,emit:n}){let r;const d=e.ref(null),f=e.computed(()=>{const p=d.value;return p&&(p instanceof HTMLElement?p:p.$el)});function c(){return r||(r=Ua(f.value,{escapeDeactivates:o.escapeDeactivates,allowOutsideClick:o.allowOutsideClick,returnFocusOnDeactivate:o.returnFocusOnDeactivate,clickOutsideDeactivates:o.clickOutsideDeactivates,onActivate:()=>{n("update:active",!0),n("activate")},onDeactivate:()=>{n("update:active",!1),n("deactivate")},onPostActivate:()=>n("postActivate"),onPostDeactivate:()=>n("postDeactivate"),initialFocus:o.initialFocus,fallbackFocus:o.fallbackFocus,tabbableOptions:o.tabbableOptions,delayInitialFocus:o.delayInitialFocus}))}return e.onMounted(()=>{e.watch(()=>o.active,p=>{p&&f.value?c().activate():r&&(r.deactivate(),(!f.value||f.value.nodeType===Node.COMMENT_NODE)&&(r=null))},{immediate:!0,flush:"post"})}),e.onUnmounted(()=>{r&&r.deactivate(),r=null}),{activate(){c().activate()},deactivate(){r&&r.deactivate()},renderImpl(){if(!a.default)return null;const p=a.default().filter(v=>v.type!==e.Comment);return!p||!p.length||p.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),p):e.cloneVNode(p[0],{ref:d})}}}});function rt(){return{debounce:(a,n)=>{let r;return(...d)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{a(...d)},n)}}}}var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qa(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var _e={exports:{}};_e.exports,function(o,a){var n=200,r="__lodash_hash_undefined__",d=9007199254740991,f="[object Arguments]",c="[object Array]",p="[object Boolean]",h="[object Date]",v="[object Error]",B="[object Function]",N="[object GeneratorFunction]",I="[object Map]",_="[object Number]",C="[object Object]",j="[object Promise]",V="[object RegExp]",x="[object Set]",X="[object String]",G="[object Symbol]",H="[object WeakMap]",P="[object ArrayBuffer]",R="[object DataView]",S="[object Float32Array]",A="[object Float64Array]",K="[object Int8Array]",w="[object Int16Array]",s="[object Int32Array]",u="[object Uint8Array]",m="[object Uint8ClampedArray]",g="[object Uint16Array]",k="[object Uint32Array]",E=/[\\^$.*+?()[\]{}|]/g,T=/\w*$/,F=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,y={};y[f]=y[c]=y[P]=y[R]=y[p]=y[h]=y[S]=y[A]=y[K]=y[w]=y[s]=y[I]=y[_]=y[C]=y[V]=y[x]=y[X]=y[G]=y[u]=y[m]=y[g]=y[k]=!0,y[v]=y[B]=y[H]=!1;var ee=typeof we=="object"&&we&&we.Object===Object&&we,W=typeof self=="object"&&self&&self.Object===Object&&self,L=ee||W||Function("return this")(),fe=a&&!a.nodeType&&a,re=fe&&!0&&o&&!o.nodeType&&o,me=re&&re.exports===fe;function Vn(t,i){return t.set(i[0],i[1]),t}function Rn(t,i){return t.add(i),t}function Ln(t,i){for(var l=-1,b=t?t.length:0;++l<b&&i(t[l],l,t)!==!1;);return t}function Mn(t,i){for(var l=-1,b=i.length,O=t.length;++l<b;)t[O+l]=i[l];return t}function lt(t,i,l,b){var O=-1,M=t?t.length:0;for(b&&M&&(l=t[++O]);++O<M;)l=i(l,t[O],O,t);return l}function Pn(t,i){for(var l=-1,b=Array(t);++l<t;)b[l]=i(l);return b}function Zn(t,i){return t==null?void 0:t[i]}function dt(t){var i=!1;if(t!=null&&typeof t.toString!="function")try{i=!!(t+"")}catch{}return i}function ut(t){var i=-1,l=Array(t.size);return t.forEach(function(b,O){l[++i]=[O,b]}),l}function Fe(t,i){return function(l){return t(i(l))}}function ft(t){var i=-1,l=Array(t.size);return t.forEach(function(b){l[++i]=b}),l}var jn=Array.prototype,Kn=Function.prototype,Se=Object.prototype,xe=L["__core-js_shared__"],mt=function(){var t=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),pt=Kn.toString,Y=Se.hasOwnProperty,Ce=Se.toString,Hn=RegExp("^"+pt.call(Y).replace(E,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bt=me?L.Buffer:void 0,ht=L.Symbol,gt=L.Uint8Array,zn=Fe(Object.getPrototypeOf,Object),Un=Object.create,Gn=Se.propertyIsEnumerable,Wn=jn.splice,vt=Object.getOwnPropertySymbols,qn=bt?bt.isBuffer:void 0,Xn=Fe(Object.keys,Object),De=se(L,"DataView"),pe=se(L,"Map"),Ve=se(L,"Promise"),Re=se(L,"Set"),Le=se(L,"WeakMap"),be=se(Object,"create"),Yn=ne(De),Jn=ne(pe),Qn=ne(Ve),eo=ne(Re),to=ne(Le),yt=ht?ht.prototype:void 0,kt=yt?yt.valueOf:void 0;function te(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var b=t[i];this.set(b[0],b[1])}}function ao(){this.__data__=be?be(null):{}}function no(t){return this.has(t)&&delete this.__data__[t]}function oo(t){var i=this.__data__;if(be){var l=i[t];return l===r?void 0:l}return Y.call(i,t)?i[t]:void 0}function ro(t){var i=this.__data__;return be?i[t]!==void 0:Y.call(i,t)}function io(t,i){var l=this.__data__;return l[t]=be&&i===void 0?r:i,this}te.prototype.clear=ao,te.prototype.delete=no,te.prototype.get=oo,te.prototype.has=ro,te.prototype.set=io;function q(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var b=t[i];this.set(b[0],b[1])}}function co(){this.__data__=[]}function so(t){var i=this.__data__,l=Ne(i,t);if(l<0)return!1;var b=i.length-1;return l==b?i.pop():Wn.call(i,l,1),!0}function lo(t){var i=this.__data__,l=Ne(i,t);return l<0?void 0:i[l][1]}function uo(t){return Ne(this.__data__,t)>-1}function fo(t,i){var l=this.__data__,b=Ne(l,t);return b<0?l.push([t,i]):l[b][1]=i,this}q.prototype.clear=co,q.prototype.delete=so,q.prototype.get=lo,q.prototype.has=uo,q.prototype.set=fo;function ie(t){var i=-1,l=t?t.length:0;for(this.clear();++i<l;){var b=t[i];this.set(b[0],b[1])}}function mo(){this.__data__={hash:new te,map:new(pe||q),string:new te}}function po(t){return Ee(this,t).delete(t)}function bo(t){return Ee(this,t).get(t)}function ho(t){return Ee(this,t).has(t)}function go(t,i){return Ee(this,t).set(t,i),this}ie.prototype.clear=mo,ie.prototype.delete=po,ie.prototype.get=bo,ie.prototype.has=ho,ie.prototype.set=go;function ce(t){this.__data__=new q(t)}function vo(){this.__data__=new q}function yo(t){return this.__data__.delete(t)}function ko(t){return this.__data__.get(t)}function wo(t){return this.__data__.has(t)}function _o(t,i){var l=this.__data__;if(l instanceof q){var b=l.__data__;if(!pe||b.length<n-1)return b.push([t,i]),this;l=this.__data__=new ie(b)}return l.set(t,i),this}ce.prototype.clear=vo,ce.prototype.delete=yo,ce.prototype.get=ko,ce.prototype.has=wo,ce.prototype.set=_o;function So(t,i){var l=Ze(t)||Go(t)?Pn(t.length,String):[],b=l.length,O=!!b;for(var M in t)(i||Y.call(t,M))&&!(O&&(M=="length"||Ko(M,b)))&&l.push(M);return l}function wt(t,i,l){var b=t[i];(!(Y.call(t,i)&&Nt(b,l))||l===void 0&&!(i in t))&&(t[i]=l)}function Ne(t,i){for(var l=t.length;l--;)if(Nt(t[l][0],i))return l;return-1}function Co(t,i){return t&&_t(i,je(i),t)}function Me(t,i,l,b,O,M,z){var Z;if(b&&(Z=M?b(t,O,M,z):b(t)),Z!==void 0)return Z;if(!Te(t))return t;var Bt=Ze(t);if(Bt){if(Z=Po(t),!i)return Ro(t,Z)}else{var le=ae(t),It=le==B||le==N;if(qo(t))return $o(t,i);if(le==C||le==f||It&&!M){if(dt(t))return M?t:{};if(Z=Zo(It?{}:t),!i)return Lo(t,Co(Z,t))}else{if(!y[le])return M?t:{};Z=jo(t,le,Me,i)}}z||(z=new ce);var $t=z.get(t);if($t)return $t;if(z.set(t,Z),!Bt)var Ot=l?Mo(t):je(t);return Ln(Ot||t,function(Ke,Be){Ot&&(Be=Ke,Ke=t[Be]),wt(Z,Be,Me(Ke,i,l,b,Be,t,z))}),Z}function No(t){return Te(t)?Un(t):{}}function Eo(t,i,l){var b=i(t);return Ze(t)?b:Mn(b,l(t))}function To(t){return Ce.call(t)}function Bo(t){if(!Te(t)||zo(t))return!1;var i=Tt(t)||dt(t)?Hn:F;return i.test(ne(t))}function Io(t){if(!Ct(t))return Xn(t);var i=[];for(var l in Object(t))Y.call(t,l)&&l!="constructor"&&i.push(l);return i}function $o(t,i){if(i)return t.slice();var l=new t.constructor(t.length);return t.copy(l),l}function Pe(t){var i=new t.constructor(t.byteLength);return new gt(i).set(new gt(t)),i}function Oo(t,i){var l=i?Pe(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.byteLength)}function Ao(t,i,l){var b=i?l(ut(t),!0):ut(t);return lt(b,Vn,new t.constructor)}function Fo(t){var i=new t.constructor(t.source,T.exec(t));return i.lastIndex=t.lastIndex,i}function xo(t,i,l){var b=i?l(ft(t),!0):ft(t);return lt(b,Rn,new t.constructor)}function Do(t){return kt?Object(kt.call(t)):{}}function Vo(t,i){var l=i?Pe(t.buffer):t.buffer;return new t.constructor(l,t.byteOffset,t.length)}function Ro(t,i){var l=-1,b=t.length;for(i||(i=Array(b));++l<b;)i[l]=t[l];return i}function _t(t,i,l,b){l||(l={});for(var O=-1,M=i.length;++O<M;){var z=i[O],Z=b?b(l[z],t[z],z,l,t):void 0;wt(l,z,Z===void 0?t[z]:Z)}return l}function Lo(t,i){return _t(t,St(t),i)}function Mo(t){return Eo(t,je,St)}function Ee(t,i){var l=t.__data__;return Ho(i)?l[typeof i=="string"?"string":"hash"]:l.map}function se(t,i){var l=Zn(t,i);return Bo(l)?l:void 0}var St=vt?Fe(vt,Object):Jo,ae=To;(De&&ae(new De(new ArrayBuffer(1)))!=R||pe&&ae(new pe)!=I||Ve&&ae(Ve.resolve())!=j||Re&&ae(new Re)!=x||Le&&ae(new Le)!=H)&&(ae=function(t){var i=Ce.call(t),l=i==C?t.constructor:void 0,b=l?ne(l):void 0;if(b)switch(b){case Yn:return R;case Jn:return I;case Qn:return j;case eo:return x;case to:return H}return i});function Po(t){var i=t.length,l=t.constructor(i);return i&&typeof t[0]=="string"&&Y.call(t,"index")&&(l.index=t.index,l.input=t.input),l}function Zo(t){return typeof t.constructor=="function"&&!Ct(t)?No(zn(t)):{}}function jo(t,i,l,b){var O=t.constructor;switch(i){case P:return Pe(t);case p:case h:return new O(+t);case R:return Oo(t,b);case S:case A:case K:case w:case s:case u:case m:case g:case k:return Vo(t,b);case I:return Ao(t,b,l);case _:case X:return new O(t);case V:return Fo(t);case x:return xo(t,b,l);case G:return Do(t)}}function Ko(t,i){return i=i??d,!!i&&(typeof t=="number"||$.test(t))&&t>-1&&t%1==0&&t<i}function Ho(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}function zo(t){return!!mt&&mt in t}function Ct(t){var i=t&&t.constructor,l=typeof i=="function"&&i.prototype||Se;return t===l}function ne(t){if(t!=null){try{return pt.call(t)}catch{}try{return t+""}catch{}}return""}function Uo(t){return Me(t,!0,!0)}function Nt(t,i){return t===i||t!==t&&i!==i}function Go(t){return Wo(t)&&Y.call(t,"callee")&&(!Gn.call(t,"callee")||Ce.call(t)==f)}var Ze=Array.isArray;function Et(t){return t!=null&&Xo(t.length)&&!Tt(t)}function Wo(t){return Yo(t)&&Et(t)}var qo=qn||Qo;function Tt(t){var i=Te(t)?Ce.call(t):"";return i==B||i==N}function Xo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=d}function Te(t){var i=typeof t;return!!t&&(i=="object"||i=="function")}function Yo(t){return!!t&&typeof t=="object"}function je(t){return Et(t)?So(t):Io(t)}function Jo(){return[]}function Qo(){return!1}o.exports=Uo}(_e,_e.exports);var Xa=_e.exports;const Ya=qa(Xa),Ja={key:0,class:"sidebar-header"},Qa={class:"sidebar-content-container"},en={key:0,class:"sidebar-top"},tn={"aria-label":"Main menu"},an={key:0,class:"level-primary top-items"},nn={key:1,class:"sidebar-level-divider",role:"separator"},on={key:2,class:"level-primary bottom-items"},rn={class:"sidebar-footer"},it=U(e.defineComponent({__name:"AppSidebar",props:{topItems:{type:Array,default:()=>[]},bottomItems:{type:Array,default:()=>[]},headerHeight:{type:Number,default:60},topOffset:{type:Number,default:0},zIndex:{type:Number,default:3},open:{type:Boolean,default:!1},mobileEnabled:{type:Boolean,default:!1},mobileTopOffset:{type:Number,default:0},mobileHeaderVisible:{type:Boolean,default:!1},mobileCloseDelay:{type:Number,default:350},mobileOverlay:{type:Boolean,default:!0},mobileOverlayZIndex:{type:Number,default:null},mobileOverlayCloseOnClick:{type:Boolean,default:!0}},emits:["click","toggle"],setup(o,{emit:a}){const n=o;e.useCssVars(s=>({"2c5b02a5":c.value.mobileHeight,"19baf097":c.value.mobileTop,"01f7cae3":o.zIndex,e9cb373a:c.value.height,e991d0ce:c.value.top,"8a4ad026":h.value.marginTop,"28946a7f":p.value.display,"3e6b7496":p.value.minHeight,"92ecef30":v.value.top,"16fef085":v.value.zIndex}));const r=e.useSlots(),d=e.computed(()=>!!r.header),f=e.computed(()=>!!r.top),c=e.computed(()=>({mobileTop:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:n.topOffset?`${n.topOffset}px`:"0",top:n.topOffset?`${n.topOffset}px`:"0",mobileHeight:n.mobileTopOffset&&n.mobileEnabled?`calc(100% - ${n.mobileTopOffset}px)`:"100%",height:n.topOffset?`calc(100% - ${n.topOffset}px)`:"100%"})),p=e.computed(()=>({display:!n.mobileHeaderVisible&&n.mobileEnabled?"none":"flex",minHeight:`${n.headerHeight}px`})),h=e.computed(()=>({marginTop:d.value?`${n.headerHeight}px`:"0"})),v=e.computed(()=>({top:n.mobileTopOffset&&n.mobileEnabled?`${n.mobileTopOffset}px`:"0",zIndex:n.mobileOverlayZIndex!==null?n.mobileOverlayZIndex:n.zIndex>1?n.zIndex-1:1})),B=s=>Ya(s).map(m=>{var g,k,E;if(m){(!m.key||!((g=m.key)!=null&&g.trim()))&&(m.key=String(m.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-")),(!m.testId||!((k=m.testId)!=null&&k.trim()))&&(m.testId=String(m.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"));for(const T of m.items||[])T.parentKey=m.key,(!T.testId||!((E=T.testId)!=null&&E.trim()))&&(T.testId=String(T.name||"").trim().toLowerCase().replace(/[^[a-z]/gi,"-"))}return m}),N=e.computed(()=>n.topItems.length?B(n.topItems):[]),I=e.computed(()=>n.bottomItems.length?B(n.bottomItems):[]),_=e.ref(n.open),C=s=>{var u,m;_.value!==s&&(_.value=s,a("toggle",s)),s?(u=document==null?void 0:document.body)==null||u.classList.add("kong-ui-app-sidebar-open"):(m=document==null?void 0:document.body)==null||m.classList.remove("kong-ui-app-sidebar-open"),V.value=!1},j=()=>{n.mobileOverlayCloseOnClick&&C(!1)},V=e.ref(!1),x=s=>{V.value=!0,a("click",s),setTimeout(()=>{C(!1)},n.mobileCloseDelay)};e.watch(()=>n.open,s=>{C(s)});const{debounce:X}=rt(),G=X(()=>{_.value&&H.value!==(window==null?void 0:window.innerWidth)&&(H.value=window==null?void 0:window.innerWidth,C(!1))},200),H=e.ref(),P=e.ref(!1),R=e.ref(),S=()=>{P.value||(P.value=!0,clearTimeout(R.value),R.value=setTimeout(()=>P.value=!1,1300))},A=e.ref(null),K=e.computed(()=>_.value&&n.mobileEnabled),w=async s=>{var u,m;s?(await e.nextTick(),await new Promise(g=>setTimeout(g,300)),(u=A.value)==null||u.activate()):(m=A.value)==null||m.deactivate()};return e.watch(K,async s=>{s?await w(!0):await w(!1)},{immediate:!0}),e.onMounted(()=>{H.value=window==null?void 0:window.innerWidth,window.addEventListener("resize",G),window.addEventListener("resize",S)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",G),window.removeEventListener("resize",S)}),(s,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[_.value&&o.mobileOverlay&&o.mobileEnabled?(e.openBlock(),e.createElementBlock("div",{key:0,class:"kong-ui-app-sidebar-overlay",onClick:j})):e.createCommentVNode("",!0),e.createVNode(e.unref(Wa),{ref_key:"focusTrap",ref:A,active:!1,"allow-outside-click":"","fallback-focus":".kong-ui-app-sidebar"},{default:e.withCtx(()=>[e.createElementVNode("aside",{class:e.normalizeClass(["kong-ui-app-sidebar",{"sidebar-open":_.value,"no-sidebar-header":!d.value,"mobile-header-hidden":o.mobileEnabled&&(!d.value||!o.mobileHeaderVisible),"mobile-disabled":!o.mobileEnabled,"disable-transitions":P.value}]),tabindex:"-1"},[d.value?(e.openBlock(),e.createElementBlock("div",Ja,[e.renderSlot(s.$slots,"header",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Qa,[f.value?(e.openBlock(),e.createElementBlock("div",en,[e.renderSlot(s.$slots,"top",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("nav",tn,[N.value.length?(e.openBlock(),e.createElementBlock("ul",an,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,m=>(e.openBlock(),e.createBlock(Ue,{key:m.name,item:m,onClick:x},null,8,["item"]))),128))])):e.createCommentVNode("",!0),N.value.length&&I.value.length?(e.openBlock(),e.createElementBlock("div",nn)):e.createCommentVNode("",!0),I.value.length?(e.openBlock(),e.createElementBlock("ul",on,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,m=>(e.openBlock(),e.createBlock(Ue,{key:m.name,item:m,onClick:x},null,8,["item"]))),128))])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",rn,[e.renderSlot(s.$slots,"footer",{},void 0,!0)])],2)]),_:3},512)],64))}}),[["__scopeId","data-v-4f0a752f"]]),Ae=o=>(e.pushScopeId("data-v-00a332e0"),o=o(),e.popScopeId(),o),cn=["aria-label","onClick"],sn=[Ae(()=>e.createElementVNode("span",{class:"line"},null,-1)),Ae(()=>e.createElementVNode("span",{class:"line"},null,-1)),Ae(()=>e.createElementVNode("span",{class:"line"},null,-1))],ct=U(e.defineComponent({__name:"SidebarToggle",props:{active:{type:Boolean,default:!1}},emits:["toggle"],setup(o,{emit:a}){const n=o,r=e.ref(n.active||!1),d=()=>{r.value=!r.value,a("toggle",r.value)};return e.watch(()=>n.active,f=>{r.value=f}),(f,c)=>(e.openBlock(),e.createElementBlock("a",{"aria-haspopup":"true","aria-label":r.value?"Close Main Menu":"Open Main Menu",class:e.normalizeClass(["sidebar-menu-toggle",{active:r.value}]),href:"#",role:"button",onClick:e.withModifiers(d,["prevent"])},sn,10,cn))}}),[["__scopeId","data-v-00a332e0"]]),ln="#ffffff",dn="#000933",un="#000933",fn="#ffffff",mn="0px",pn="4px",bn=o=>(e.pushScopeId("data-v-f81adf4e"),o=o(),e.popScopeId(),o),hn={id:"kong-ui-app-layout-notification"},gn={class:"mobile-logo"},vn={key:0,class:"navbar-logo"},yn={class:"kong-ui-app-layout-main","data-testid":"kong-ui-app-layout-main"},kn={class:"kong-ui-app-layout-content"},wn={class:"kong-ui-app-layout-content-inner"},_n=bn(()=>e.createElementVNode("div",{id:"kong-ui-app-layout-teleport-default-slot"},null,-1)),st=U(e.defineComponent({__name:"AppLayout",props:{hideDefaultSlot:{type:Boolean,default:!1},navbarHidden:{type:Boolean,default:!1},sidebarHidden:{type:Boolean,default:!1},sidebarOpen:{type:Boolean,default:!1},sidebarTopItems:{type:Array,default:()=>[]},sidebarBottomItems:{type:Array,default:()=>[]},theme:{type:String,default:"light",validator:o=>["light","dark"].includes(o)}},emits:["sidebar-click"],setup(o,{emit:a}){const n=o;e.useCssVars(S=>({"3c1b64a7":V.value,e1fe5bc6:x.value,"74505bb5":j.value,24707019:X.value,"1f0d0dcc":G.value}));const r=e.useSlots(),d=e.reactive({navbarLeft:e.computed(()=>!!r["navbar-left"]),navbarCenter:e.computed(()=>!!r["navbar-center"]),navbarRight:e.computed(()=>!!r["navbar-right"]),navbarLogo:e.computed(()=>!!r["navbar-logo"]),navbarMobileLogo:e.computed(()=>!!r["navbar-mobile-logo"]),sidebarHeader:e.computed(()=>!!r["sidebar-header"]),sidebarTop:e.computed(()=>!!r["sidebar-top"]),sidebarFooter:e.computed(()=>!!r["sidebar-footer"])}),f=e.computed(()=>n.hideDefaultSlot),c=e.reactive({hidden:e.computed(()=>n.navbarHidden)}),p=e.reactive({topItems:e.computed(()=>n.sidebarTopItems),bottomItems:e.computed(()=>n.sidebarBottomItems),open:e.computed(()=>n.sidebarOpen),hidden:e.computed(()=>n.sidebarHidden)}),h=S=>{a("sidebar-click",S)},v=e.ref(!1),B=S=>{v.value=S};e.watchEffect(()=>{v.value=e.toRef(p,"open").value||!1});const N=e.ref(0),I=e.ref(60),_=e.ref(0),C=e.computed(()=>c.hidden?_.value:I.value+_.value),j=e.computed(()=>n.theme==="light"?un:fn),V=e.computed(()=>n.theme==="light"?ln:dn),x=e.computed(()=>n.theme==="light"?"var(--kong-ui-app-layout-main-box-shadow, -30px 174px 250px #0023db)":"none"),X=e.computed(()=>`${C.value}px`),G=e.computed(()=>p.hidden||c.hidden?mn:pn),{debounce:H}=rt(),P=H((S=!1)=>{if(S||N.value!==(window==null?void 0:window.innerWidth)){N.value=window==null?void 0:window.innerWidth;const A=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");A&&(_.value=A.offsetHeight)}},200),R=e.ref();return e.onMounted(()=>{var A,K;(A=document==null?void 0:document.body)==null||A.classList.add("kong-ui-app-layout-body"),(K=document==null?void 0:document.documentElement)==null||K.classList.add("kong-ui-app-layout-html"),N.value=window==null?void 0:window.innerWidth,P(!0);const S=document==null?void 0:document.querySelector(".kong-ui-app-layout #kong-ui-app-layout-notification");S&&(R.value=new ResizeObserver(w=>{window.requestAnimationFrame(()=>{if(!(!Array.isArray(w)||!w.length))for(const s of w){const u=s.contentRect.height;_.value!==u&&(_.value=u)}})}),R.value.observe(S)),window.addEventListener("resize",P)}),e.onBeforeUnmount(()=>{R.value&&R.value.disconnect(),window.removeEventListener("resize",P)}),(S,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-app-layout",[{"navbar-hidden":c.hidden},{"sidebar-hidden":p.hidden}]])},[e.createElementVNode("div",hn,[e.renderSlot(S.$slots,"notification",{},void 0,!0)]),c.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze,{key:String(p.hidden),"left-offset":p.hidden?0:void 0,"top-offset":_.value},e.createSlots({"mobile-sidebar-toggle":e.withCtx(()=>[p.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ct,{key:0,active:v.value,onToggle:B},null,8,["active"]))]),_:2},[d.navbarMobileLogo?{name:"mobile-logo",fn:e.withCtx(()=>[e.createElementVNode("div",gn,[e.renderSlot(S.$slots,"navbar-mobile-logo",{},void 0,!0)])]),key:"0"}:void 0,d.navbarLogo?{name:"logo",fn:e.withCtx(()=>[p.hidden?(e.openBlock(),e.createElementBlock("div",vn,[e.renderSlot(S.$slots,"navbar-logo",{},void 0,!0)])):e.createCommentVNode("",!0)]),key:"1"}:void 0,d.navbarLeft?{name:"left",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-left",{},void 0,!0)]),key:"2"}:void 0,d.navbarCenter?{name:"center",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-center",{},void 0,!0)]),key:"3"}:void 0,d.navbarRight?{name:"right",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"navbar-right",{},void 0,!0)]),key:"4"}:void 0]),1032,["left-offset","top-offset"])),p.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(it,{key:1,"bottom-items":p.bottomItems,"header-height":I.value,"mobile-enabled":"","mobile-header-visible":!1,"mobile-top-offset":C.value,open:v.value,"top-items":p.topItems,"top-offset":_.value,onClick:h,onToggle:B},e.createSlots({_:2},[d.sidebarHeader?{name:"header",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-header",{},void 0,!0)]),key:"0"}:void 0,d.sidebarTop?{name:"top",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-top",{},void 0,!0)]),key:"1"}:void 0,d.sidebarFooter?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(S.$slots,"sidebar-footer",{},void 0,!0)]),key:"2"}:void 0]),1032,["bottom-items","header-height","mobile-top-offset","open","top-items","top-offset"])),e.createElementVNode("main",yn,[e.createElementVNode("div",kn,[e.createElementVNode("div",wn,[_n,e.renderSlot(S.$slots,"app-error",{},void 0,!0),f.value?e.createCommentVNode("",!0):e.renderSlot(S.$slots,"default",{key:0},void 0,!0)])])])],2))}}),[["__scopeId","data-v-f81adf4e"]]),Sn=o=>(e.pushScopeId("data-v-d7e33427"),o=o(),e.popScopeId(),o),Cn={class:"kong-ui-app-page-header"},Nn={key:0,class:"page-header-breadcrumbs","data-testid":"page-header-breadcrumbs"},En=Sn(()=>e.createElementVNode("span",{class:"page-header-breadcrumb-divider"},"/",-1)),Tn={class:"page-header-title-section"},Bn={class:"page-header-title-wrapper"},In={key:0,class:"page-header-title-before","data-testid":"page-header-title-before"},$n=["title"],On={key:1,class:"page-header-title-after","data-testid":"page-header-title-after"},An={key:0,class:"page-header-actions","data-testid":"page-header-actions"},Fn={key:1,class:"page-header-section-below","data-testid":"page-header-section-below"},xn=U(e.defineComponent({__name:"AppPageHeader",props:{title:{type:String,required:!0},breadcrumbs:{type:Array,default:()=>[]}},setup(o){const a=o,n=e.computed(()=>{var f;return!!((f=a.breadcrumbs)!=null&&f.length)}),r=(f,c)=>f.key||`breadcrumb-${c}`,d=e.computed(()=>a.breadcrumbs.map((f,c)=>`icon-${r(f,c)}`)||[]);return(f,c)=>{const p=e.resolveComponent("KBreadcrumbs");return e.openBlock(),e.createElementBlock("div",Cn,[n.value?(e.openBlock(),e.createElementBlock("div",Nn,[e.createVNode(p,{items:o.breadcrumbs},e.createSlots({divider:e.withCtx(()=>[En]),_:2},[e.renderList(d.value,h=>({name:h,fn:e.withCtx(()=>[e.renderSlot(f.$slots,h,{},void 0,!0)])}))]),1032,["items"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Tn,[e.createElementVNode("div",Bn,[f.$slots["title-before"]?(e.openBlock(),e.createElementBlock("div",In,[e.renderSlot(f.$slots,"title-before",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("h1",{class:"page-header-title","data-testid":"page-header-title",title:o.title},e.toDisplayString(o.title),9,$n),f.$slots["title-after"]?(e.openBlock(),e.createElementBlock("div",On,[e.renderSlot(f.$slots,"title-after",{},void 0,!0)])):e.createCommentVNode("",!0)]),f.$slots.actions?(e.openBlock(),e.createElementBlock("div",An,[e.renderSlot(f.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),f.$slots.below?(e.openBlock(),e.createElementBlock("div",Fn,[e.renderSlot(f.$slots,"below",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-d7e33427"]]),Dn={install:(o,a={})=>{o.component(a.name||"AppLayout",st)}};D.AccountDropdown=Ft,D.AppAboutSection=Ut,D.AppError=na,D.AppLayout=st,D.AppNavbar=ze,D.AppPageHeader=xn,D.AppSidebar=it,D.SidebarToggle=ct,D.default=Dn,Object.defineProperties(D,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/app-layout",
|
|
3
|
-
"version": "2.2.4
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/app-layout.umd.js",
|
|
6
6
|
"module": "./dist/app-layout.es.js",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@kong/kongponents": "9.0.0-
|
|
23
|
+
"@kong/kongponents": "9.0.0-alpha.68",
|
|
24
24
|
"vue": "^3.3.4",
|
|
25
25
|
"vue-router": "^4.2.5"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@kong/icons": "^1.8.
|
|
28
|
+
"@kong/icons": "^1.8.3",
|
|
29
29
|
"focus-trap": "^7.5.3",
|
|
30
30
|
"focus-trap-vue": "^4.0.2",
|
|
31
31
|
"lodash.clonedeep": "^4.5.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@kong/design-tokens": "^1.12.
|
|
35
|
-
"@kong/kongponents": "9.0.0-
|
|
34
|
+
"@kong/design-tokens": "^1.12.1",
|
|
35
|
+
"@kong/kongponents": "9.0.0-alpha.68",
|
|
36
36
|
"@types/lodash.clonedeep": "^4.5.7",
|
|
37
37
|
"vue": "^3.3.4",
|
|
38
38
|
"vue-router": "^4.2.5"
|