@mxtommy/kip 3.10.0-beta.32 → 3.10.0-beta.34
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/kip-plugin/src/index.ts +22 -17
- package/package.json +1 -1
- package/plugin/index.js +17 -13
- package/public/3rdpartylicenses.txt +26 -26
- package/public/{chunk-4RVFIZB6.js → chunk-7FXC6ZCG.js} +1 -1
- package/public/{chunk-RFSG3HYB.js → chunk-DW3FZIIP.js} +8 -8
- package/public/{chunk-GJ33QBJ6.js → chunk-EWWJTY5U.js} +1 -1
- package/public/chunk-H2UHZISE.js +1 -0
- package/public/{chunk-OSFVNS4U.js → chunk-HWRYGZHY.js} +11 -11
- package/public/chunk-JBNATG4K.js +1 -0
- package/public/chunk-KSORZFLR.js +7 -0
- package/public/chunk-LA7JUGVG.js +2 -0
- package/public/{chunk-BJBOBGE4.js → chunk-PBYG5L2Q.js} +1 -1
- package/public/{chunk-J3WNXGAQ.js → chunk-QFA6EGZZ.js} +1 -1
- package/public/chunk-QHWRRGKT.js +2 -0
- package/public/{chunk-PZS3DSZO.js → chunk-QKZFW37P.js} +1 -1
- package/public/{chunk-LRX3XYXK.js → chunk-RSFIBBDU.js} +1 -1
- package/public/{chunk-LEXHVK5K.js → chunk-UMX5S3AL.js} +1 -1
- package/public/chunk-YN2WYPNC.js +16 -0
- package/public/{chunk-WKDUEVL2.js → chunk-ZFPSXMA5.js} +1 -1
- package/public/{chunk-CKTYGHMF.js → chunk-ZZOEEKZS.js} +5 -5
- package/public/index.html +1 -1
- package/public/main-BAIQ3IBV.js +53 -0
- package/public/chunk-ARHEMYCP.js +0 -2
- package/public/chunk-FW2LAMAA.js +0 -16
- package/public/chunk-JFDPDIG2.js +0 -2
- package/public/chunk-NL52VRFS.js +0 -1
- package/public/chunk-PTADMSJZ.js +0 -1
- package/public/chunk-QOWRNJOY.js +0 -1
- package/public/chunk-VJWBCIDF.js +0 -7
- package/public/main-5CMGKUTD.js +0 -53
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Bd as o,Fb as v,Hd as a,Ma as n,Na as s,_a as l,ca as d}from"./chunk-YN2WYPNC.js";var u=(()=>{class t{get vertical(){return this._vertical}set vertical(i){this._vertical=a(i)}_vertical=!1;get inset(){return this._inset}set inset(i){this._inset=a(i)}_inset=!1;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=n({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,r){e&2&&(l("aria-orientation",r.vertical?"vertical":"horizontal"),v("mat-divider-vertical",r.vertical)("mat-divider-horizontal",!r.vertical)("mat-divider-inset",r.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(e,r){},styles:[`.mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-sys-outline));border-top-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-sys-outline));border-right-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return t})(),f=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=s({type:t});static \u0275inj=d({imports:[o,o]})}return t})();export{u as a,f as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b,i as g,j as k,k as A,p as v}from"./chunk-ZZOEEKZS.js";import{Fc as w,Kc as D,Lc as l,Pc as C,Tc as N,Yc as I,a as c,b as f,ba as m,bc as p,c as P,dc as d,f as S,fa as n,j as V,l as u,oa as R,qa as h,t as y}from"./chunk-YN2WYPNC.js";var T=(()=>{class i{_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((o,a)=>a===e?f(c({},o),{name:t,icon:r}):o))}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],o=A(s);o.id=b.create(),o.name=t,o.icon=r||"dashboard-dashboard",Array.isArray(o.configuration)?o.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:",o.configuration),o.configuration=[]),this.dashboards.update(a=>[...a,o])}updateConfiguration(e,t){this.dashboards.update(r=>r.map((s,o)=>o===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||i)};static \u0275prov=m({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var j={name:"@mxtommy/kip",version:"3.10.0-beta.34",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 i{_http=n(w);_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(()=>{let s,o;if(!e)s=null,o=null;else{let a=r.map(O=>{var _=O,{configuration:E}=_,$=P(_,["configuration"]);return $});s={displayName:t,screens:a},o=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,o).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||i)};static \u0275prov=m({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ve=(()=>{class i{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(C);_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||i)};static \u0275prov=m({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{T as a,ve as b};
|