UNPKG

@mxtommy/kip

Version:

An advanced and versatile marine instrumentation package to display Signal K data.

2 lines (1 loc) 3.34 kB
import{a as B,c as D,d as j,e as z,f as $,g as R}from"./chunk-OTD7HT32.js";import"./chunk-JZUG3W7P.js";import{i as H,o as I,p as P}from"./chunk-6QHCHGTT.js";import"./chunk-SGYCFQGT.js";import{a as S,b as E}from"./chunk-7TWI6ZJI.js";import{Cc as w,Dc as m,Ea as d,Ec as k,Ed as T,Fa as g,Fc as y,Hb as x,Nb as u,Zb as h,dc as C,ec as v,gc as b,hc as F,ic as n,jc as o,kc as f,oc as _,qc as M,rc as p,te as V,ua as c,ub as r,ve as A,ye as O}from"./chunk-Y7X77HSW.js";function W(t,s){if(t&1){let e=_();n(0,"button",8),M("click",function(){let l=d(e).$implicit,a=p(2);return g(a.selectFile(l.file))}),m(1),o()}if(t&2){let e=s.$implicit;r(),y(" ",e.title," ")}}function q(t,s){if(t&1&&b(0,W,2,1,"button",7,v),t&2){let e=p();F(e.helpFiles)}}function G(t,s){if(t&1&&f(0,"markdown",6),t&2){let e=p();h("src","assets/help-docs/"+e.selectedFile)}}var ae=(()=>{class t{pageTitle="Help";http=c(T);_router=c(H);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=x({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,l){if(i&1){let a=_();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),u(7,q,2,0,"ng-template",4),o(),n(8,"button",5),M("click",function(){return d(a),g(l.closePage())}),n(9,"mat-icon"),m(10,"close"),o()()(),f(11,"mat-divider"),u(12,G,1,1,"markdown",6)}if(i&2){let a=w(6);r(2),k(l.pageTitle),r(),h("matMenuTriggerFor",a),r(9),C(l.selectedFile?12:-1)}},dependencies:[B,O,A,V,R,z,D,j,$,E,S,P,I],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(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, .87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-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{ae as AppHelpComponent};