@mxtommy/kip
Version:
An advanced and versatile marine instrumentation package to display Signal K data.
2 lines (1 loc) • 3.29 kB
JavaScript
import{a as D,c as j,d as z,e as $,f as R,g as W}from"./chunk-2LFTAKOR.js";import{j as I,p as P,q as V}from"./chunk-PFPMEH2B.js";import{a as E,b as B}from"./chunk-MZFYZTYI.js";import{$b as h,Aa as g,Ac as y,Bc as T,Be as A,Cb as x,De as O,Ge as S,Jd as H,Sb as C,Tb as v,Ub as b,Wb as F,Xb as w,Yb as u,Zb as n,_b as o,gc as f,ic as _,kc as p,lb as r,ta as c,uc as k,wb as M,za as d,zc as m}from"./chunk-W2S6R4AZ.js";function q(t,s){if(t&1){let e=f();n(0,"button",8),_("click",function(){let a=d(e).$implicit,l=p(2);return g(l.selectFile(a.file))}),m(1),o()}if(t&2){let e=s.$implicit;r(),T(" ",e.title," ")}}function G(t,s){if(t&1&&F(0,q,2,1,"button",7,b),t&2){let e=p();w(e.helpFiles)}}function J(t,s){if(t&1&&h(0,"markdown",6),t&2){let e=p();u("src","assets/help-docs/"+e.selectedFile)}}var re=(()=>{class t{pageTitle="Help";http=c(H);_router=c(I);helpFiles=[];selectedFile="";ngOnInit(){this.http.get("assets/help-docs/menu.json").subscribe({next:e=>{this.helpFiles=e.filter(i=>this.isValidFile(i.file)),this.helpFiles.length>0&&(this.selectedFile=this.helpFiles[0].file)},error:e=>{console.error("[Help] Failed to load help menu:",e),this.helpFiles=[]}})}selectFile(e){this.selectedFile=e}isValidFile(e){return e.endsWith(".md")}closePage(){this._router.navigate(["/dashboard"])}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-help"]],decls:13,vars:3,consts:[["helpMenu","matMenu"],[1,"fullpage-header"],[1,"fullpage-header-title"],["mat-flat-button","",3,"matMenuTriggerFor"],["matMenuContent",""],["mat-icon-button","",1,"dialog-close-icon",3,"click"],[1,"markdown-content",3,"src"],["mat-menu-item",""],["mat-menu-item","",3,"click"]],template:function(i,a){if(i&1){let l=f();n(0,"div",1)(1,"h6",2),m(2),o(),n(3,"button",3),m(4," Table of Content "),o(),n(5,"mat-menu",null,0),x(7,G,2,0,"ng-template",4),o(),n(8,"button",5),_("click",function(){return d(l),g(a.closePage())}),n(9,"mat-icon"),m(10,"close"),o()()(),h(11,"mat-divider"),C(12,J,1,1,"markdown",6)}if(i&2){let l=k(6);r(2),y(a.pageTitle),r(),u("matMenuTriggerFor",l),r(9),v(a.selectedFile?12:-1)}},dependencies:[D,S,O,A,W,$,j,z,R,B,E,V,P],styles:[".fullpage-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.fullpage-header-title[_ngcontent-%COMP%]{margin-block-start:0px;margin-block-end:0px;padding:18px 24px 13px;color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, .87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, .03125em))}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.dialog-content-padding[_ngcontent-%COMP%]{--mat-dialog-content-padding: 0px 24px 20px 24px}.markdown-content[_ngcontent-%COMP%]{display:block;height:calc(100% - 75px);width:100%;overflow-x:scroll;padding:25px}"]})}return t})();export{re as AppHelpComponent};