@mxtommy/kip 3.10.0-beta.4 → 3.10.0-beta.41
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/package.json +3 -2
- package/plugin/index.js +234 -26
- package/plugin/openApi.json +141 -0
- package/public/3rdpartylicenses.txt +52 -52
- package/public/assets/help-docs/welcome.md +2 -2
- package/public/assets/svg/icons.svg +5 -1
- package/public/chunk-27I36ZYA.js +2 -0
- package/public/chunk-2YGPLTEW.js +6 -0
- package/public/chunk-4MSEQKGR.js +2 -0
- package/public/chunk-5UBH6OWU.js +5 -0
- package/public/{chunk-Y2IB2JDT.js → chunk-AISQQTVD.js} +10 -10
- package/public/chunk-CYSELPWA.js +9 -0
- package/public/chunk-HO743WL4.js +3 -0
- package/public/{chunk-LRX3XYXK.js → chunk-I772OX6I.js} +1 -1
- package/public/chunk-IUCJGG6N.js +1 -0
- package/public/chunk-JNQX4WPI.js +1 -0
- package/public/chunk-JNXVWBL2.js +1 -0
- package/public/chunk-LKF7CNOE.js +2 -0
- package/public/chunk-LNXAWAUQ.js +1 -0
- package/public/chunk-MMJBKCH5.js +1 -0
- package/public/{chunk-GJ33QBJ6.js → chunk-MZURT7UO.js} +1 -1
- package/public/chunk-PB7HT3XU.js +15 -0
- package/public/chunk-PR5DAT3I.js +2 -0
- package/public/{chunk-J3WNXGAQ.js → chunk-QG3TFUUS.js} +1 -1
- package/public/{chunk-TDHAZ7DS.js → chunk-QXMATZB6.js} +1 -1
- package/public/chunk-SPUZNRYQ.js +5 -0
- package/public/chunk-SZM7K54W.js +2 -0
- package/public/chunk-TFULQA7J.js +3 -0
- package/public/{chunk-7OMETTVK.js → chunk-USU5F3L5.js} +1 -1
- package/public/chunk-ZKL2MFXX.js +1 -0
- package/public/index.html +1 -1
- package/public/{main-SVHIKBQ5.js → main-H5ITJANO.js} +12 -14
- package/COPILOT.md +0 -362
- package/eslint.config.js +0 -45
- package/kip-plugin/src/index.ts +0 -49
- package/kip-plugin/tsconfig.plugin.json +0 -13
- package/public/chunk-BZF6OYAF.js +0 -7
- package/public/chunk-FW2LAMAA.js +0 -16
- package/public/chunk-GBHBJN24.js +0 -1
- package/public/chunk-GDOUBCED.js +0 -1
- package/public/chunk-HKUJILH7.js +0 -6
- package/public/chunk-JFDPDIG2.js +0 -2
- package/public/chunk-KJQ6X3BT.js +0 -2
- package/public/chunk-MXKB5Z6M.js +0 -5
- package/public/chunk-NL52VRFS.js +0 -1
- package/public/chunk-PTADMSJZ.js +0 -1
- package/public/chunk-T5GXSVMN.js +0 -1
- package/public/chunk-VSGAZDLP.js +0 -11
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as De,b as Me,c as ve,d as Pe,e as Oe,f as V,g as Te,h as Ie,i as ke,j as Re,k as Ee,l as Ve,m as Fe,n as b,o as He,p as y,q as Ue,r as Be}from"./chunk-5UBH6OWU.js";import"./chunk-PR5DAT3I.js";import{c as we,e as be,i as ye,l as Se}from"./chunk-2YGPLTEW.js";import{a as xe}from"./chunk-JNXVWBL2.js";import"./chunk-LKF7CNOE.js";import{B as E,C as he,F as _e,G as Ce,g as le,k as pe,l as se,n as me,o as de,p as ue,q as fe,r as ge,u as R}from"./chunk-SPUZNRYQ.js";import"./chunk-4MSEQKGR.js";import"./chunk-27I36ZYA.js";import{$b as Z,Db as B,Eb as W,Ec as ae,Fa as c,Fb as G,Hd as oe,Id as re,J as q,Kb as l,Lb as k,Mb as C,Md as ce,Oa as f,Oc as z,Pb as J,Pc as ne,Qb as X,Rb as Y,Ua as g,Xd as L,_ as Q,_d as A,a as F,ac as ee,b as H,bb as M,cb as v,eb as U,fb as h,fc as te,ga as m,gb as _,hb as s,ib as o,j as N,ja as x,jb as i,ka as D,kb as u,kc as w,lc as j,ob as P,pa as K,pb as O,qd as ie,rb as T,tb as I,vb as d,w as $}from"./chunk-PB7HT3XU.js";function Ae(e,r){e&1&&(o(0,"span",3),l(1,"Boolean"),i())}function Ne(e,r){e&1&&(o(0,"span",3),l(1,"String"),i())}function $e(e,r){e&1&&(o(0,"span",3),l(1,"String"),i())}function qe(e,r){e&1&&(o(0,"span",3),l(1,"Object"),i())}function Qe(e,r){if(e&1){let t=T();o(0,"button",5),I("click",function(){x(t);let n=d();return D(n.openDialog())}),l(1),i()}if(e&2){let t=d();c(),k(t.selectedUnit)}}function Ke(e,r){if(e&1&&(o(0,"mat-option",6),l(1),i()),e&2){let t=r.$implicit;s("value",t.measure),c(),C(" ",t.measure," ")}}function We(e,r){if(e&1&&(o(0,"mat-optgroup",3),h(1,Ke,2,2,"mat-option",6,U),i()),e&2){let t=r.$implicit;s("label",t.group),c(),_(t.units)}}var je=(()=>{class e{_units=m(Se);_dialog=m(me);path=w.required();source=w(void 0);pathValue=w(void 0);type=w.required();units=null;selectedUnit="unitless";ngOnInit(){this.units=this._units.getConversionsForPath(this.path()),this.selectedUnit=this.units.base}convertValue(t,a){return a==="number"?this._units.convertToUnit(this.selectedUnit,t):t}openDialog(){this._dialog.open(Ge,{data:{selectedUnit:this.selectedUnit,units:this.units}}).afterClosed().subscribe(a=>{a&&(this.selectedUnit=a)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["data-inspector-row"]],inputs:{path:[1,"path"],source:[1,"source"],pathValue:[1,"pathValue"],type:[1,"type"]},decls:10,vars:3,consts:[[1,"cell-source","cells"],[1,"cell-value","cells"],[1,"cell-action","cells"],[1,"path-type"],["mat-stroked-button","",1,"change-units-btn"],["mat-stroked-button","",1,"change-units-btn",3,"click"]],template:function(a,n){if(a&1&&(o(0,"mat-cell",0),l(1),i(),o(2,"mat-cell",1),l(3),i(),o(4,"mat-cell",2),M(5,Ae,2,0,"span",3)(6,Ne,2,0,"span",3)(7,$e,2,0,"span",3)(8,qe,2,0,"span",3)(9,Qe,2,1,"button",4),i()),a&2){let p;c(),k(n.source()),c(2),k(n.convertValue(n.pathValue(),n.type())),c(2),v((p=n.type())==="boolean"?5:p==="string"?6:p==="Date"?7:p==="object"?8:9)}},dependencies:[V,A,L],styles:[`.change-units-btn{width:100%}.cell-source:first-of-type{padding-left:0;flex:1 1 30%}.cells{border:0px solid white;word-break:break-word;overflow-wrap:break-word}.cell-value{justify-content:flex-start;flex:1 1 70%;padding:0}.cell-action{justify-content:end;flex:0 0 107px}.cell-action:last-of-type{padding:0}.path-type{width:100%;height:40px;align-content:center;text-align:center;color:var(--mat-sys-primary)}
|
|
2
2
|
`],encapsulation:2})}return e})(),Ge=(()=>{class e{dialogRef=m(pe);data=m(se);selectedUnit=null;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["dialog-unit-selector"]],decls:14,vars:2,consts:[["mat-dialog-title",""],["appearance","outline","floatLabel","always",2,"padding-top","15px","padding-bottom","15px"],[3,"valueChange","value"],[3,"label"],["mat-flat-button","","mat-dialog-close",""],["mat-flat-button","",3,"mat-dialog-close"],[3,"value"]],template:function(a,n){a&1&&(o(0,"h2",0),l(1,"Select Unit type"),i(),o(2,"mat-dialog-content")(3,"mat-form-field",1)(4,"mat-label"),l(5,"Unit"),i(),o(6,"mat-select",2),Y("valueChange",function(S){return X(n.data.selectedUnit,S)||(n.data.selectedUnit=S),S}),h(7,We,3,1,"mat-optgroup",3,U),i()()(),o(9,"mat-dialog-actions")(10,"button",4),l(11,"Cancel"),i(),o(12,"button",5),l(13,"Ok"),i()()),a&2&&(c(6),J("value",n.data.selectedUnit),c(),_(n.data.units.conversions),c(5),s("mat-dialog-close",n.data.selectedUnit))},dependencies:[ue,fe,E,R,ye,we,be,ge,A,L,de],encapsulation:2})}return e})();var Je=(e,r)=>r.key;function Xe(e,r){e&1&&(o(0,"mat-header-cell",19),l(1," Path "),i())}function Ye(e,r){if(e&1&&(o(0,"mat-cell",20),l(1),i()),e&2){let t=r.$implicit;c(),C(" ",t.path," ")}}function Ze(e,r){e&1&&(o(0,"mat-header-cell",21),l(1," PUT Support "),i())}function et(e,r){e&1&&(o(0,"mat-icon",23),l(1,"check_circle"),i())}function tt(e,r){if(e&1&&(o(0,"mat-cell",22),M(1,et,2,0,"mat-icon",23),i()),e&2){let t=r.$implicit;c(),v(t.meta!=null&&t.meta.supportsPut?1:-1)}}function at(e,r){e&1&&(o(0,"mat-header-cell",24),l(1," Source "),i())}function nt(e,r){if(e&1&&u(0,"data-inspector-row",27),e&2){let t=r.$implicit,a=d().$implicit,n=d();s("path",a.path)("source",n.getSourceKey(t))("pathValue",n.getSourceValue(t))("type",a.type)}}function it(e,r){if(e&1&&(o(0,"mat-cell",25)(1,"div",26),h(2,nt,1,4,"data-inspector-row",27,Je),Z(4,"keyvalue"),i()()),e&2){let t=r.$implicit;c(2),_(ee(4,0,t.sources))}}function ot(e,r){e&1&&u(0,"mat-header-row",28)}function rt(e,r){e&1&&u(0,"mat-row",29)}function lt(e,r){if(e&1&&(o(0,"tr",30)(1,"td",31),l(2),i()()),e&2){d();let t=G(6);c(2),C('No data matching the filter "',t.value,'"')}}var Nt=(()=>{class e{dataService=m(le);destroyRef=m(K);_responsive=m(ie);isPhonePortrait;filterSubject=new N;paginator=j.required(b);sort=j.required(y);pageTitle="Data Inspector";pageSize=25;hidePageSize=!1;showFirstLastButtons=!0;showPageSizeOptions=[5,10,25,100];tableData=new Fe([]);displayedColumns=["path","supportsPut","defaultSource"];constructor(){this.filterSubject.pipe(q(500)).pipe(z(this.destroyRef)).subscribe(t=>{this.tableData.filter=t.trim().toLowerCase(),this.tableData.paginator&&this.tableData.paginator.firstPage()}),this.isPhonePortrait=ne(this._responsive.observe(ce.HandsetPortrait)),te(()=>{this.isPhonePortrait().matches?(this.hidePageSize=!0,this.showFirstLastButtons=!1,this.showPageSizeOptions=[]):(this.hidePageSize=!1,this.showFirstLastButtons=!0,this.showPageSizeOptions=[5,10,25,100])})}ngAfterViewInit(){this.dataService.startSkDataFullTree().pipe($(t=>t.filter(a=>Object.keys(a.sources||{}).length>0).map(a=>H(F({},a),{sources:a.type&&a.type.includes("object")&&typeof a.sources=="object"?Object.fromEntries(Object.entries(a.sources).map(([n,p])=>[n,H(F({},p),{sourceValue:typeof p.sourceValue=="object"?JSON.stringify(p.sourceValue):p.sourceValue})])):a.sources}))),Q(500),z(this.destroyRef)).subscribe(t=>{this.tableData.data=t}),this.tableData.paginator=this.paginator(),this.tableData.sort=this.sort(),this.tableData.sortingDataAccessor=(t,a)=>{switch(a){case"supportsPut":return t.meta?.supportsPut?1:0;default:return t[a]}}}applyFilter(t){let a=t.target.value;this.filterSubject.next(a)}trackByPath(t,a){return`${a.path}`}trackBySource(t,a){return`${a.key}`}getSourceKey(t){return String(t.key)}getSourceValue(t){return t.value.sourceValue}ngOnDestroy(){this.filterSubject.complete(),this.dataService.stopSkDataFullTree()}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["data-inspector"]],viewQuery:function(a,n){a&1&&(B(n.paginator,b,5),B(n.sort,y,5)),a&2&&W(2)},decls:21,vars:10,consts:[["input",""],[3,"pageTitle"],[1,"data-inspector-container"],[1,"filter-field"],["matInput","","placeholder","Type any part of the path, source or value...","value","",3,"keyup"],["matSort","","matSortActive","path","matSortDirection","asc",1,"table-content-area","mat-elevation-z8",3,"dataSource","trackBy"],["matColumnDef","path"],["class","pathHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","pathCell row-cell",4,"matCellDef"],["matColumnDef","supportsPut"],["class","putHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","putCell row-cell",4,"matCellDef"],["matColumnDef","defaultSource"],["class","dataHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","dataCell row-cell",4,"matCellDef"],["class","headerRow",4,"matHeaderRowDef","matHeaderRowDefSticky"],["class","table-row",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[1,"paginator",3,"pageSize","pageSizeOptions","hidePageSize","showFirstLastButtons"],["mat-sort-header","",1,"pathHeader"],[1,"pathCell","row-cell"],["mat-sort-header","",1,"putHeader"],[1,"putCell","row-cell"],["matTooltip","Supports PUT operation",1,"put-icon"],["mat-sort-header","",1,"dataHeader"],[1,"dataCell","row-cell"],[1,"flex-container"],[1,"source-sub-row",3,"path","source","pathValue","type"],[1,"headerRow"],[1,"table-row"],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(a,n){if(a&1){let p=T();u(0,"page-header",1),o(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),l(4,"Filter"),i(),o(5,"input",4,0),I("keyup",function(ze){return x(p),D(n.applyFilter(ze))}),i()(),o(7,"mat-table",5),P(8,6),g(9,Xe,2,0,"mat-header-cell",7)(10,Ye,2,1,"mat-cell",8),O(),P(11,9),g(12,Ze,2,0,"mat-header-cell",10)(13,tt,2,1,"mat-cell",11),O(),P(14,12),g(15,at,2,0,"mat-header-cell",13)(16,it,5,2,"mat-cell",14),O(),g(17,ot,1,0,"mat-header-row",15)(18,rt,1,0,"mat-row",16)(19,lt,3,1,"tr",17),i(),u(20,"mat-paginator",18),i()}a&2&&(s("pageTitle",n.pageTitle),c(7),s("dataSource",n.tableData)("trackBy",n.trackByPath),c(10),s("matHeaderRowDef",n.displayedColumns)("matHeaderRowDefSticky",!0),c(),s("matRowDefColumns",n.displayedColumns),c(2),s("pageSize",n.pageSize)("pageSizeOptions",n.showPageSizeOptions)("hidePageSize",n.hidePageSize)("showFirstLastButtons",n.showFirstLastButtons))},dependencies:[he,E,R,Ve,De,ve,Te,Pe,Me,Ie,Oe,V,ke,Re,Ee,Ce,_e,He,b,Be,y,Ue,je,xe,re,oe,ae],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.data-inspector-container[_ngcontent-%COMP%]{margin-left:24px;margin-right:24px;height:calc(100% - 63px)}.table-content-area[_ngcontent-%COMP%]{height:calc(100% - 142px);overflow-y:auto;width:100%;scroll-behavior:smooth}.mat-column-path[_ngcontent-%COMP%]{flex:0 0 50%;width:50%}.mat-mdc-table[_ngcontent-%COMP%]{overflow:auto}.paginator[_ngcontent-%COMP%]{width:100%;height:56px;background-color:var(--mat-sys-background)}.filter-field[_ngcontent-%COMP%]{padding:15px 0;width:100%;height:86px}.pathHeader[_ngcontent-%COMP%]{flex:1 1 45%}.putHeader[_ngcontent-%COMP%]{flex:1 1 10%}.dataHeader[_ngcontent-%COMP%]{flex:1 1 45%}.table-row[_ngcontent-%COMP%]{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, .12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid}.row-cell[_ngcontent-%COMP%]{border-bottom-color:#fff;border-bottom-width:0px;border-bottom-style:solid}.pathCell[_ngcontent-%COMP%]{flex:1 1 45%;word-break:break-word;overflow-wrap:break-word}.putCell[_ngcontent-%COMP%]{flex:1 1 10%}.dataCell[_ngcontent-%COMP%]{flex:1 1 45%;flex-flow:column;flex-wrap:nowrap;gap:2px}.flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;gap:5px;margin:5px 0;height:100%;width:100%}.source-sub-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px;width:100%}.put-icon[_ngcontent-%COMP%]{color:var(--kip-starboard-color)}@media screen and (max-width: 750px){.pathHeader[_ngcontent-%COMP%], .dataHeader[_ngcontent-%COMP%]{flex:1 1 50%}.dataCell[_ngcontent-%COMP%]{flex:1 1 100%}.dataCell[_ngcontent-%COMP%]{flex:1 1 100%;margin-left:24px}.mat-mdc-table[_ngcontent-%COMP%] .mat-mdc-row[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap}.mat-mdc-table[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]:before{content:attr(data-label);float:left;padding-right:5px}mat-row[_ngcontent-%COMP%]:after{min-height:auto;padding-bottom:10px}.dataRow[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.actionCell[_ngcontent-%COMP%]{margin-left:24px}}"]})}return e})();export{Nt as DataInspectorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as k,b as A,g as v}from"./chunk-SPUZNRYQ.js";import{a as b,j as g}from"./chunk-4MSEQKGR.js";import{Jc as C,Oc as D,Pc as l,Tc as w,Xc as N,a as c,ad as I,b as f,c as P,ca as m,dc as p,f as S,fc as d,ga as n,j as V,l as u,pa as R,ra as h,t as y}from"./chunk-PB7HT3XU.js";var T=(()=>{class o{_settings=n(g);_router=n(N);dashboards=h([],{equal:k});activeDashboard=h(0);_widgetAction=new u(null);widgetAction$=this._widgetAction.asObservable();_isDashboardStatic=new u(!0);isDashboardStatic$=this._isDashboardStatic.asObservable();isDashboardStatic=l(this.isDashboardStatic$);blankDashboard=[{id:null,name:"Dashboard 1",icon:"dashboard-dashboard",configuration:[{w:12,h:12,id:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc",selector:"widget-tutorial",input:{widgetProperties:{type:"widget-tutorial",uuid:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc"}},x:0,y:0}]}];constructor(){let e=this._settings.getDashboardConfig();if(!e||e.length===0){console.warn("[Dashboard Service] No dashboards found in settings, creating blank dashboard");let t=this.blankDashboard.map(r=>f(c({},r),{id:b.create()}));this.dashboards.set([...t])}else this.dashboards.set(this._settings.getDashboardConfig());d(()=>{this._settings.saveDashboards(this.dashboards())})}toggleStaticDashboard(){this._isDashboardStatic.next(!this._isDashboardStatic.value)}add(e,t,r){this.dashboards.update(s=>[...s,{id:b.create(),name:e,icon:r,configuration:t}])}update(e,t,r){this.dashboards.update(s=>s.map((i,a)=>a===e?f(c({},i),{name:t,icon:r}):i))}delete(e){this.dashboards.update(t=>t.filter((r,s)=>s!==e)),this.dashboards().length===0?(this.add("Dashboard "+(this.dashboards().length+1),[]),this.activeDashboard.set(0)):this.activeDashboard()>this.dashboards().length-1&&this.activeDashboard.set(this.dashboards().length-1)}duplicate(e,t,r){if(e<0||e>=this.dashboards().length){console.error(`[Dashboard Service] Invalid itemIndex: ${e}`);return}let s=this.dashboards()[e],i=A(s);i.id=b.create(),i.name=t,i.icon=r||"dashboard-dashboard",Array.isArray(i.configuration)?i.configuration.forEach(a=>{a&&a.input?.widgetProperties?(a.id=b.create(),a.input.widgetProperties.uuid=a.id):console.error("Dashboard Service] Widget configuration is missing required properties:",a)}):(console.error("Dashboard Service] Dashboard configuration is not an array:",i.configuration),i.configuration=[]),this.dashboards.update(a=>[...a,i])}updateConfiguration(e,t){this.dashboards.update(r=>r.map((s,i)=>i===e?k(s.configuration,t)?s:f(c({},s),{configuration:t}):s))}previousDashboard(){this.activeDashboard()+1>this.dashboards().length-1?this.activeDashboard.set(0):this.activeDashboard.set(this.activeDashboard()+1)}nextDashboard(){this.activeDashboard()-1<0?this.activeDashboard.set(this.dashboards().length-1):this.activeDashboard.set(this.activeDashboard()-1)}setActiveDashboard(e){e>=0&&e<this.dashboards().length?this.activeDashboard.set(e):console.error(`[Dashboard Service] Invalid dashboard ID: ${e}`)}navigateToActive(){this._router.navigate(["/dashboard",this.activeDashboard()])}navigateTo(e){e>=0&&e<this.dashboards().length?this._router.navigate(["/dashboard",e]):console.error(`[Dashboard Service] Invalid dashboard ID: ${e}`)}navigateToNextDashboard(){let e=null;this.activeDashboard()-1<0?e=this.dashboards().length-1:e=this.activeDashboard()-1,this._router.navigate(["/dashboard",e])}navigateToPreviousDashboard(){let e=null;this.activeDashboard()+1>=this.dashboards().length?e=0:e=this.activeDashboard()+1,this._router.navigate(["/dashboard",e])}deleteWidget(e){this._widgetAction.next({id:e,operation:"delete"})}duplicateWidget(e){this._widgetAction.next({id:e,operation:"duplicate"})}setStaticDashboard(e){this._isDashboardStatic.next(e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var j={name:"@mxtommy/kip",version:"3.10.0-beta.41",description:"An advanced and versatile marine instrumentation package to display Signal K data.",license:"MIT",author:{name:"Thomas St.Pierre, David Godin"},contributors:[{name:"David Godin",email:"godind@hotmail.com"},{name:"Thomas St.Pierre",email:"thomas@samoht.ca"}],homepage:"https://github.com/mxtommy/Kip",bugs:"https://github.com/mxtommy/Kip/issues",repository:{type:"git",url:"git+https://github.com/mxtommy/Kip.git"},keywords:["signalk-webapp","signalk-category-instruments","signalk-category-notifications","signalk-node-server-plugin","signal k","signalk","instruments","dashboard","marine","nmea"],signalk:{appIcon:"assets/icon-72x72.png",displayName:"KIP Instrument MFD"},main:"plugin/index.js","signalk-plugin-enabled-by-default":!0,scripts:{test:"ng test",lint:"ng lint",dev:"ng serve --configuration=dev --serve-path=/@mxtommy/kip/","build:plugin":"tsc -p ./kip-plugin/tsconfig.plugin.json","build:dev":"ng build --configuration=dev","build:prod":"ng build --configuration=production","build:all":"npm run build:plugin && npm run build:prod",e2e:"ng e2e"},devDependencies:{"@angular-devkit/build-angular":"^20.1.6","@angular/animations":"20.1.7","@angular/build":"^20.1.6","@angular/cdk":"20.1.6","@angular/cli":"^20.1.6","@angular/common":"20.1.7","@angular/compiler":"20.1.7","@angular/compiler-cli":"20.1.7","@angular/core":"20.1.7","@angular/forms":"20.1.7","@angular/language-service":"20.1.7","@angular/material":"20.1.6","@angular/platform-browser":"20.1.7","@angular/platform-browser-dynamic":"20.1.7","@angular/router":"20.1.7","@godind/ng-canvas-gauges":"^6.2.1","@robloche/chartjs-plugin-streaming":"^3.1.0","@types/canvas-gauges":"^2.1.8","@types/howler":"^2.2.10","@types/jasmine":"~3.6.0","@types/jasminewd2":"^2.0.9","@types/js-quantities":"^1.6.6","@types/lodash-es":"^4.17.9","@types/node":"^24.1.0","@zakj/no-sleep":"^0.13.5","angular-eslint":"20.1.1","chart.js":"^4.4.9","chartjs-adapter-date-fns":"^3.0.0","chartjs-plugin-annotation":"^3.0.1",codelyzer:"^6.0.0","compare-versions":"^6.1.1","core-js":"^3.13.1","date-fns":"^2.30.0",eslint:"^9.29.0",gridstack:"^11.4.0",howler:"^2.2.4","jasmine-core":"~4.0.1","jasmine-spec-reporter":"~5.0.0","js-quantities":"^1.8.0",karma:"^6.4.4","karma-chrome-launcher":"~3.1.0","karma-cli":"~2.0.0","karma-coverage-istanbul-reporter":"^3.0.3","karma-jasmine":"~4.0.0","karma-jasmine-html-reporter":"^1.6.0","lodash-es":"^4.17.21","ng-packagr":"^20.0.1","ngx-markdown":"^20.0.0","ngx-resize-observer":"^3.1.0",protractor:"~7.0.0","pwa-asset-generator":"^8.1.1",rxjs:"^7.8.2",sass:"^1.49.9",screenfull:"^6.0.2",steelseries:"^2.0.9","ts-node":"^10.9.2",tslib:"^2.6.2",typescript:"^5.8.3","zone.js":"^0.15.1"},dependencies:{"@signalk/server-api":"^2.7.2"}};var U=(()=>{class o{_http=n(C);_settings=n(g);_dashboard=n(T);_data=n(v);_destroyRef=n(R);_displayName=l(this._settings.getInstanceNameAsO());_isRemoteControl=l(this._settings.getIsRemoteControlAsO());PLUGIN_URL=this._settings.signalkUrl.url+"/plugins/kip";KIP_UUID=this._settings.KipUUID;ACTIVE_SCREEN_PATH=`self.displays.${this.KIP_UUID}.activeScreen`;previousIsRemoteControl=!1;constructor(){d(()=>{let e=this._isRemoteControl();if(!e&&!this.previousIsRemoteControl)return;let t=this._displayName(),r=this._dashboard.dashboards();p(()=>{this.previousIsRemoteControl=e;let s,i;if(!e)s=null,i=null;else{let a=r.map(O=>{var _=O,{configuration:E}=_,$=P(_,["configuration"]);return $});s={displayName:t,screens:a},i=this._dashboard.activeDashboard()}this.shareScreens(this.KIP_UUID,s).then(()=>{console.log("[Remote Dashboards] Screens shared")}).catch(a=>{console.error("[Remote Dashboards] Error sharing screens:",a)}),this.setActiveDashboard(this.KIP_UUID,i).then(()=>{console.log("[Remote Dashboards] Shared active dashboard")}).catch(a=>{console.error("[Remote Dashboards] Error sharing active dashboard:",a)})})}),d(()=>{if(!this._isRemoteControl())return;let t=this._dashboard.activeDashboard();p(()=>{this.setActiveDashboard(this.KIP_UUID,t).then(()=>{console.log("[Remote Dashboards] Shared active dashboard")}).catch(r=>{console.error("[Remote Dashboards] Error sharing active dashboard:",r)})})}),this.setupRemoteControlListener()}setupRemoteControlListener(){this._settings.getIsRemoteControlAsO().pipe(D(this._destroyRef)).subscribe(e=>{e?this._data.subscribePath(this.ACTIVE_SCREEN_PATH,"default").pipe(D(this._destroyRef)).subscribe(t=>{if(t.data.value==null)return;let r=Number(t.data.value);!isNaN(r)&&r>=0&&r<this._dashboard.dashboards().length&&this._dashboard.activeDashboard()!==r&&(console.log(`[Remote Dashboards] Setting active dashboard to ${r} from remote update`),this._dashboard.navigateTo(r))}):this._data.unsubscribePath(this.ACTIVE_SCREEN_PATH)})}setActiveDashboard(e,t){return S(this,null,function*(){let r=t===null?null:{screenIdx:t};return y(this._http.put(`${this.PLUGIN_URL}/displays/${e}/activeScreen`,r))})}shareScreens(e,t){let r=t===null?null:c({},t);return y(this._http.put(`${this.PLUGIN_URL}/displays/${e}`,r))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var ve=(()=>{class o{MODE_PATH="self.environment.mode";configurableThemeColors=[{label:"Contrast",value:"contrast"},{label:"Blue",value:"blue"},{label:"Green",value:"green"},{label:"Orange",value:"orange"},{label:"Yellow",value:"yellow"},{label:"Pink",value:"pink"},{label:"Purple",value:"purple"},{label:"Grey",value:"grey"}];snackbarAppNotifications=new V;cssThemeColorRoles$=new u(null);_cssThemeColorRoles=null;_settings=n(g);_data=n(v);_iconRegistry=n(I);_sanitizer=n(w);_remote=n(U);isNightMode=h(!1);_useAutoNightMode=l(this._settings.getAutoNightModeAsO(),{requireSync:!0});_theme=l(this._settings.getThemeNameAsO(),{requireSync:!0});_redNightMode=l(this._settings.getRedNightModeAsO(),{requireSync:!0});_environmentMode=l(this._data.subscribePath(this.MODE_PATH,"default"));appVersion=h(j.version);browserVersion=h("Unknown");osVersion=h("Unknown");constructor(){this._iconRegistry.addSvgIconSet(this._sanitizer.bypassSecurityTrustResourceUrl("assets/svg/icons.svg")),d(()=>{this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")}),d(()=>{let e=this._environmentMode().data.value;this._useAutoNightMode()&&(this.isNightMode.set(e==="night"),this.toggleDayNightMode())}),d(()=>{let e=this._redNightMode();p(()=>{e?this.toggleDayNightMode():this.toggleDayNightMode()})}),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue(),this.browserVersion.set(this.getBrowserVersion()),this.osVersion.set(this.getOSVersion()),console.log("*********** KIP Version Information ***********"),console.log(`** App Version: ${this.appVersion()}`),console.log(`** Browser Version: ${this.browserVersion()}`),console.log(`** OS Version: ${this.osVersion()}`),console.log("***********************************************")}sendSnackbarNotification(e,t=1e4,r=!1,s="Dismiss"){this.snackbarAppNotifications.next({message:e,duration:t,silent:r,action:s})}getSnackbarAppNotifications(){return this.snackbarAppNotifications.asObservable()}readThemeCssRoleVariables(){let e=document.body,t=getComputedStyle(e),r={background:t.getPropertyValue("--mat-sys-background").trim(),cardColor:t.getPropertyValue("--kip-widget-card-background-color").trim(),blue:t.getPropertyValue("--kip-blue-color").trim(),blueDim:t.getPropertyValue("--kip-blue-dim-color").trim(),blueDimmer:t.getPropertyValue("--kip-blue-dimmer-color").trim(),green:t.getPropertyValue("--kip-green-color").trim(),greenDim:t.getPropertyValue("--kip-green-dim-color").trim(),greenDimmer:t.getPropertyValue("--kip-green-dimmer-color").trim(),grey:t.getPropertyValue("--kip-grey-color").trim(),greyDim:t.getPropertyValue("--kip-grey-dim-color").trim(),greyDimmer:t.getPropertyValue("--kip-grey-dimmer-color").trim(),orange:t.getPropertyValue("--kip-orange-color").trim(),orangeDim:t.getPropertyValue("--kip-orange-dim-color").trim(),orangeDimmer:t.getPropertyValue("--kip-orange-dimmer-color").trim(),pink:t.getPropertyValue("--kip-pink-color").trim(),pinkDim:t.getPropertyValue("--kip-pink-dim-color").trim(),pinkDimmer:t.getPropertyValue("--kip-pink-dimmer-color").trim(),purple:t.getPropertyValue("--kip-purple-color").trim(),purpleDim:t.getPropertyValue("--kip-purple-dim-color").trim(),purpleDimmer:t.getPropertyValue("--kip-purple-dimmer-color").trim(),contrast:t.getPropertyValue("--kip-contrast-color").trim(),contrastDim:t.getPropertyValue("--kip-contrast-dim-color").trim(),contrastDimmer:t.getPropertyValue("--kip-contrast-dimmer-color").trim(),yellow:t.getPropertyValue("--kip-yellow-color").trim(),yellowDim:t.getPropertyValue("--kip-yellow-dim-color").trim(),yellowDimmer:t.getPropertyValue("--kip-yellow-dimmer-color").trim(),port:t.getPropertyValue("--kip-port-color").trim(),starboard:t.getPropertyValue("--kip-starboard-color").trim(),zoneNominal:t.getPropertyValue("--kip-zone-nominal-color").trim(),zoneAlert:t.getPropertyValue("--kip-zone-alert-color").trim(),zoneWarn:t.getPropertyValue("--kip-zone-warn-color").trim(),zoneAlarm:t.getPropertyValue("--kip-zone-alarm-color").trim(),zoneEmergency:t.getPropertyValue("--kip-zone-emergency-color").trim()};this.cssThemeColorRoles$.next(r)}get cssThemeColors(){return this._cssThemeColorRoles}setBrightness(e,t=!1){let r=document.body;r.style.setProperty("--kip-nightModeBrightness",`${e}`);let s=t?" sepia(0.5) hue-rotate(-30deg)":"";r.style.setProperty("--kip-nightModeFilters",s)}toggleDayNightMode(){this.isNightMode()?this._redNightMode()?(document.body.classList.toggle("night-theme",!0),this.setBrightness(1,!1)):(this.setBrightness(this._settings.getNightModeBrightness(),!0),document.body.classList.remove("night-theme"),this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")):(document.body.classList.remove("night-theme"),this._theme()==="light-theme"&&document.body.classList.toggle("light-theme",this._theme()==="light-theme"),this.setBrightness(1,!1)),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue()}getBrowserVersion(){let e=navigator.userAgent,t="Unknown";return e.includes("Edg")?t=`Edge ${e.match(/Edg\/(\d+)/)?.[1]}`:e.includes("Chrome")&&!e.includes("Edg")&&!e.includes("Chromium")?t=`Chrome ${e.match(/Chrome\/(\d+)/)?.[1]}`:e.includes("Chromium")?t=`Chromium ${e.match(/Chromium\/(\d+)/)?.[1]}`:e.includes("Firefox")?t=`Firefox ${e.match(/Firefox\/(\d+)/)?.[1]}`:e.includes("Safari")&&!e.includes("Chrome")&&!e.includes("Chromium")?t=`Safari ${e.match(/Version\/(\d+)/)?.[1]}`:(e.includes("Opera")||e.includes("OPR"))&&(t=`Opera ${e.match(/(Opera|OPR)\/(\d+)/)?.[2]}`),t}getOSVersion(){let e=navigator.platform,t=navigator.userAgent;return e.startsWith("Mac")?"macOS":e.startsWith("Win")?"Windows":/Linux/.test(e)?t.includes("ARM")||t.includes("aarch64")||t.includes("Raspberry")||e.includes("armv7l")||e.includes("armv8l")?"Raspberry Pi":"Linux":"Unknown OS"}static \u0275fac=function(t){return new(t||o)};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{T as a,ve as b};
|
package/public/index.html
CHANGED
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
</div>
|
|
63
63
|
</app-root>
|
|
64
64
|
</div>
|
|
65
|
-
<link rel="modulepreload" href="chunk-
|
|
65
|
+
<link rel="modulepreload" href="chunk-CYSELPWA.js"><link rel="modulepreload" href="chunk-I772OX6I.js"><link rel="modulepreload" href="chunk-QXMATZB6.js"><link rel="modulepreload" href="chunk-TFULQA7J.js"><link rel="modulepreload" href="chunk-HO743WL4.js"><link rel="modulepreload" href="chunk-QG3TFUUS.js"><link rel="modulepreload" href="chunk-PR5DAT3I.js"><link rel="modulepreload" href="chunk-2YGPLTEW.js"><link rel="modulepreload" href="chunk-LKF7CNOE.js"><link rel="modulepreload" href="chunk-ZKL2MFXX.js"><script src="polyfills-KH22MU6U.js" type="module"></script><script src="main-H5ITJANO.js" type="module"></script></body>
|
|
66
66
|
</html>
|