@mxtommy/kip 1.3.0 → 2.0.1
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/CHANGELOG.md +38 -3
- package/CONTRIBUTORS.md +4 -4
- package/KipGaugeSample3-1024x508.png +0 -0
- package/LICENSE +21 -0
- package/README.md +80 -42
- package/package.json +52 -46
- package/public/3rdpartylicenses.txt +47 -419
- package/public/assets/NoSleep.min.js +2 -2
- package/public/assets/icon-64x64.png +0 -0
- package/public/assets/icon-72x72.png +0 -0
- package/public/index.html +3 -3
- package/public/main.f3d15cc777474f5f.js +1 -0
- package/public/manifest.json +9 -4
- package/public/polyfills.64db6be9cdc8f808.js +1 -0
- package/public/runtime.e75056c32c37f59d.js +1 -0
- package/public/styles.6b1c2c92be18a2cc.css +1 -0
- package/.angulardoc.json +0 -4
- package/angular.json +0 -162
- package/e2e/app.e2e-spec.ts +0 -14
- package/e2e/app.po.ts +0 -11
- package/e2e/tsconfig.e2e.json +0 -14
- package/karma.conf.js +0 -31
- package/protractor.conf.js +0 -28
- package/public/assets/svg-autopilot-inkscape-plain.svg +0 -983
- package/public/assets/svg-wind-inkscape.svg +0 -1358
- package/public/main-es2018.98175eb4c61ccaf7eb17.js +0 -1
- package/public/main-es5.98175eb4c61ccaf7eb17.js +0 -1
- package/public/polyfills-es2018.3a61665863c173cd6ba3.js +0 -1
- package/public/polyfills-es5.44827ae4ff4e41de51fb.js +0 -1
- package/public/runtime-es2018.baedb88c6d2abacae2b8.js +0 -1
- package/public/runtime-es5.baedb88c6d2abacae2b8.js +0 -1
- package/public/styles.b92ae2c466c89712209d.css +0 -5
- package/src/app/alarm-menu/alarm-menu.component.html +0 -55
- package/src/app/alarm-menu/alarm-menu.component.scss +0 -52
- package/src/app/alarm-menu/alarm-menu.component.spec.ts +0 -25
- package/src/app/alarm-menu/alarm-menu.component.ts +0 -186
- package/src/app/app-help/app-help.component.css +0 -4
- package/src/app/app-help/app-help.component.html +0 -135
- package/src/app/app-help/app-help.component.ts +0 -45
- package/src/app/app-settings.service.spec.ts +0 -15
- package/src/app/app-settings.service.ts +0 -478
- package/src/app/app.component.css +0 -39
- package/src/app/app.component.html +0 -93
- package/src/app/app.component.scss +0 -79
- package/src/app/app.component.spec.ts +0 -32
- package/src/app/app.component.ts +0 -191
- package/src/app/app.module.ts +0 -200
- package/src/app/config.blank.const.ts +0 -52
- package/src/app/config.blank.notification.const.ts +0 -19
- package/src/app/config.blank.units.const.ts +0 -23
- package/src/app/config.demo.const.ts +0 -384
- package/src/app/data-browser/data-browser.component.css +0 -29
- package/src/app/data-browser/data-browser.component.html +0 -44
- package/src/app/data-browser/data-browser.component.spec.ts +0 -25
- package/src/app/data-browser/data-browser.component.ts +0 -91
- package/src/app/data-browser-row/data-browser-row-unit-modal.html +0 -17
- package/src/app/data-browser-row/data-browser-row.component.css +0 -10
- package/src/app/data-browser-row/data-browser-row.component.html +0 -5
- package/src/app/data-browser-row/data-browser-row.component.ts +0 -79
- package/src/app/data-set.service.spec.ts +0 -15
- package/src/app/data-set.service.ts +0 -273
- package/src/app/dynamic-widget.directive.spec.ts +0 -8
- package/src/app/dynamic-widget.directive.ts +0 -11
- package/src/app/filter-self.pipe.spec.ts +0 -8
- package/src/app/filter-self.pipe.ts +0 -14
- package/src/app/fit-text.directive.spec.ts +0 -8
- package/src/app/fit-text.directive.ts +0 -61
- package/src/app/gauge-steel/gauge-steel.component.css +0 -5
- package/src/app/gauge-steel/gauge-steel.component.html +0 -4
- package/src/app/gauge-steel/gauge-steel.component.spec.ts +0 -25
- package/src/app/gauge-steel/gauge-steel.component.ts +0 -282
- package/src/app/gauges-module/base-gauge.ts +0 -301
- package/src/app/gauges-module/gauges.module.ts +0 -17
- package/src/app/gauges-module/linear-gauge.ts +0 -50
- package/src/app/gauges-module/radial-gauge.ts +0 -48
- package/src/app/layout-split/layout-split.component.html +0 -30
- package/src/app/layout-split/layout-split.component.scss +0 -33
- package/src/app/layout-split/layout-split.component.spec.ts +0 -25
- package/src/app/layout-split/layout-split.component.ts +0 -59
- package/src/app/layout-splits.service.spec.ts +0 -15
- package/src/app/layout-splits.service.ts +0 -284
- package/src/app/modal-path-selector/modal-path-selector.component.html +0 -62
- package/src/app/modal-path-selector/modal-path-selector.component.scss +0 -39
- package/src/app/modal-path-selector/modal-path-selector.component.spec.ts +0 -25
- package/src/app/modal-path-selector/modal-path-selector.component.ts +0 -132
- package/src/app/modal-widget/modal-widget.component.css +0 -33
- package/src/app/modal-widget/modal-widget.component.html +0 -341
- package/src/app/modal-widget/modal-widget.component.spec.ts +0 -25
- package/src/app/modal-widget/modal-widget.component.ts +0 -84
- package/src/app/notifications.service.spec.ts +0 -12
- package/src/app/notifications.service.ts +0 -392
- package/src/app/object-keys.pipe.spec.ts +0 -8
- package/src/app/object-keys.pipe.ts +0 -13
- package/src/app/reset-config/reset-config.component.css +0 -0
- package/src/app/reset-config/reset-config.component.html +0 -3
- package/src/app/reset-config/reset-config.component.spec.ts +0 -25
- package/src/app/reset-config/reset-config.component.ts +0 -31
- package/src/app/root-display/root-display.component.css +0 -0
- package/src/app/root-display/root-display.component.html +0 -4
- package/src/app/root-display/root-display.component.spec.ts +0 -25
- package/src/app/root-display/root-display.component.ts +0 -57
- package/src/app/safe.pipe.ts +0 -16
- package/src/app/settings/settings.component.css +0 -9
- package/src/app/settings/settings.component.html +0 -25
- package/src/app/settings/settings.component.spec.ts +0 -25
- package/src/app/settings/settings.component.ts +0 -22
- package/src/app/settings-config/settings-config.component.css +0 -39
- package/src/app/settings-config/settings-config.component.html +0 -118
- package/src/app/settings-config/settings-config.component.spec.ts +0 -25
- package/src/app/settings-config/settings-config.component.ts +0 -161
- package/src/app/settings-datasets/settings-datasets.component.html +0 -43
- package/src/app/settings-datasets/settings-datasets.component.scss +0 -39
- package/src/app/settings-datasets/settings-datasets.component.spec.ts +0 -25
- package/src/app/settings-datasets/settings-datasets.component.ts +0 -98
- package/src/app/settings-datasets/settings-datasets.modal.html +0 -54
- package/src/app/settings-notifications/settings-notifications.component.css +0 -0
- package/src/app/settings-notifications/settings-notifications.component.html +0 -65
- package/src/app/settings-notifications/settings-notifications.component.spec.ts +0 -25
- package/src/app/settings-notifications/settings-notifications.component.ts +0 -29
- package/src/app/settings-signalk/settings-signalk.component.css +0 -3
- package/src/app/settings-signalk/settings-signalk.component.html +0 -89
- package/src/app/settings-signalk/settings-signalk.component.spec.ts +0 -25
- package/src/app/settings-signalk/settings-signalk.component.ts +0 -174
- package/src/app/settings-units/settings-units.component.css +0 -4
- package/src/app/settings-units/settings-units.component.html +0 -19
- package/src/app/settings-units/settings-units.component.spec.ts +0 -25
- package/src/app/settings-units/settings-units.component.ts +0 -62
- package/src/app/settings-zones/settings-zones.component.css +0 -22
- package/src/app/settings-zones/settings-zones.component.html +0 -70
- package/src/app/settings-zones/settings-zones.component.ts +0 -154
- package/src/app/settings-zones/settings-zones.modal.css +0 -14
- package/src/app/settings-zones/settings-zones.modal.html +0 -39
- package/src/app/signalk-connection.service.ts +0 -344
- package/src/app/signalk-delta.service.spec.ts +0 -15
- package/src/app/signalk-delta.service.ts +0 -97
- package/src/app/signalk-full.service.spec.ts +0 -15
- package/src/app/signalk-full.service.ts +0 -99
- package/src/app/signalk-interfaces.ts +0 -129
- package/src/app/signalk-requests.service.spec.ts +0 -12
- package/src/app/signalk-requests.service.ts +0 -180
- package/src/app/signalk.service.spec.ts +0 -15
- package/src/app/signalk.service.ts +0 -428
- package/src/app/svg-autopilot/svg-autopilot.component.html +0 -1036
- package/src/app/svg-autopilot/svg-autopilot.component.spec.ts +0 -25
- package/src/app/svg-autopilot/svg-autopilot.component.ts +0 -174
- package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.html +0 -119
- package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.scss +0 -0
- package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.spec.ts +0 -25
- package/src/app/svg-simple-linear-gauge/svg-simple-linear-gauge.component.ts +0 -49
- package/src/app/svg-wind/svg-wind.component.css +0 -0
- package/src/app/svg-wind/svg-wind.component.html +0 -969
- package/src/app/svg-wind/svg-wind.component.scss +0 -76
- package/src/app/svg-wind/svg-wind.component.spec.ts +0 -25
- package/src/app/svg-wind/svg-wind.component.ts +0 -280
- package/src/app/unit-window/unit-window.component.css +0 -37
- package/src/app/unit-window/unit-window.component.html +0 -8
- package/src/app/unit-window/unit-window.component.spec.ts +0 -25
- package/src/app/unit-window/unit-window.component.ts +0 -134
- package/src/app/unit-window/unit-window.modal.html +0 -25
- package/src/app/units.service.ts +0 -300
- package/src/app/widget-autopilot/widget-autopilot.component.html +0 -78
- package/src/app/widget-autopilot/widget-autopilot.component.scss +0 -191
- package/src/app/widget-autopilot/widget-autopilot.component.spec.ts +0 -25
- package/src/app/widget-autopilot/widget-autopilot.component.ts +0 -774
- package/src/app/widget-blank/widget-blank.component.html +0 -5
- package/src/app/widget-blank/widget-blank.component.scss +0 -21
- package/src/app/widget-blank/widget-blank.component.spec.ts +0 -25
- package/src/app/widget-blank/widget-blank.component.ts +0 -17
- package/src/app/widget-gauge/widget-gauge.component.css +0 -26
- package/src/app/widget-gauge/widget-gauge.component.html +0 -29
- package/src/app/widget-gauge/widget-gauge.component.spec.ts +0 -25
- package/src/app/widget-gauge/widget-gauge.component.ts +0 -120
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.html +0 -126
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.scss +0 -94
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.spec.ts +0 -25
- package/src/app/widget-gauge-ng-linear/widget-gauge-ng-linear.component.ts +0 -424
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.html +0 -122
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.scss +0 -69
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.spec.ts +0 -25
- package/src/app/widget-gauge-ng-radial/widget-gauge-ng-radial.component.ts +0 -553
- package/src/app/widget-historical/widget-historical.component.css +0 -31
- package/src/app/widget-historical/widget-historical.component.html +0 -14
- package/src/app/widget-historical/widget-historical.component.scss +0 -0
- package/src/app/widget-historical/widget-historical.component.spec.ts +0 -25
- package/src/app/widget-historical/widget-historical.component.ts +0 -306
- package/src/app/widget-iframe/widget-iframe.component.css +0 -12
- package/src/app/widget-iframe/widget-iframe.component.html +0 -21
- package/src/app/widget-iframe/widget-iframe.component.spec.ts +0 -25
- package/src/app/widget-iframe/widget-iframe.component.ts +0 -63
- package/src/app/widget-list.service.spec.ts +0 -15
- package/src/app/widget-list.service.ts +0 -135
- package/src/app/widget-manager.service.spec.ts +0 -15
- package/src/app/widget-manager.service.ts +0 -141
- package/src/app/widget-numeric/widget-numeric.component.html +0 -13
- package/src/app/widget-numeric/widget-numeric.component.scss +0 -52
- package/src/app/widget-numeric/widget-numeric.component.spec.ts +0 -25
- package/src/app/widget-numeric/widget-numeric.component.ts +0 -457
- package/src/app/widget-simple-linear/widget-simple-linear.component.html +0 -28
- package/src/app/widget-simple-linear/widget-simple-linear.component.scss +0 -64
- package/src/app/widget-simple-linear/widget-simple-linear.component.spec.ts +0 -25
- package/src/app/widget-simple-linear/widget-simple-linear.component.ts +0 -199
- package/src/app/widget-state/widget-state.component.html +0 -27
- package/src/app/widget-state/widget-state.component.scss +0 -68
- package/src/app/widget-state/widget-state.component.spec.ts +0 -25
- package/src/app/widget-state/widget-state.component.ts +0 -178
- package/src/app/widget-switch/widget-switch.component.css +0 -70
- package/src/app/widget-switch/widget-switch.component.html +0 -17
- package/src/app/widget-switch/widget-switch.component.spec.ts +0 -25
- package/src/app/widget-switch/widget-switch.component.ts +0 -134
- package/src/app/widget-text-generic/widget-text-generic.component.css +0 -55
- package/src/app/widget-text-generic/widget-text-generic.component.html +0 -9
- package/src/app/widget-text-generic/widget-text-generic.component.spec.ts +0 -25
- package/src/app/widget-text-generic/widget-text-generic.component.ts +0 -253
- package/src/app/widget-tutorial/widget-tutorial.component.css +0 -0
- package/src/app/widget-tutorial/widget-tutorial.component.html +0 -34
- package/src/app/widget-tutorial/widget-tutorial.component.spec.ts +0 -25
- package/src/app/widget-tutorial/widget-tutorial.component.ts +0 -18
- package/src/app/widget-unknown/widget-unknown.component.css +0 -0
- package/src/app/widget-unknown/widget-unknown.component.html +0 -3
- package/src/app/widget-unknown/widget-unknown.component.spec.ts +0 -25
- package/src/app/widget-unknown/widget-unknown.component.ts +0 -15
- package/src/app/widget-wind/widget-wind.component.css +0 -24
- package/src/app/widget-wind/widget-wind.component.html +0 -20
- package/src/app/widget-wind/widget-wind.component.spec.ts +0 -25
- package/src/app/widget-wind/widget-wind.component.ts +0 -369
- package/src/assets/.gitkeep +0 -0
- package/src/assets/NoSleep.min.js +0 -2
- package/src/assets/alarm.mp3 +0 -0
- package/src/assets/alert.mp3 +0 -0
- package/src/assets/alertl.old.mp3 +0 -0
- package/src/assets/emergency.mp3 +0 -0
- package/src/assets/fontawesome6/css/all.min.css +0 -6
- package/src/assets/fontawesome6/webfonts/fa-brands-400.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-brands-400.woff2 +0 -0
- package/src/assets/fontawesome6/webfonts/fa-regular-400.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-regular-400.woff2 +0 -0
- package/src/assets/fontawesome6/webfonts/fa-solid-900.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-solid-900.woff2 +0 -0
- package/src/assets/fontawesome6/webfonts/fa-v4compatibility.ttf +0 -0
- package/src/assets/fontawesome6/webfonts/fa-v4compatibility.woff2 +0 -0
- package/src/assets/icon-192x192.png +0 -0
- package/src/assets/icon-256x256.png +0 -0
- package/src/assets/icon-384x384.png +0 -0
- package/src/assets/icon-512x512.png +0 -0
- package/src/assets/notification.mp3 +0 -0
- package/src/assets/steelseries-min.js +0 -25
- package/src/assets/steelseries-min.js.map +0 -8
- package/src/assets/steelseries.js +0 -15834
- package/src/assets/svg-autopilot-inkscape-plain.svg +0 -983
- package/src/assets/svg-wind-inkscape.svg +0 -1358
- package/src/assets/tween-min.js +0 -1
- package/src/assets/tween.js +0 -381
- package/src/assets/warn.mp3 +0 -0
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -8
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -20
- package/src/main.ts +0 -11
- package/src/manifest.json +0 -33
- package/src/polyfills.ts +0 -80
- package/src/styles.css +0 -47
- package/src/styles.scss +0 -157
- package/src/test.ts +0 -32
- package/src/themes/darkBlueTheme.scss +0 -117
- package/src/themes/defaultTheme.scss +0 -50
- package/src/themes/highContrastTheme.scss +0 -47
- package/src/themes/modernTheme.scss +0 -143
- package/src/themes/nightMode.scss +0 -185
- package/src/themes/platypusTheme.scss +0 -80
- package/src/themes/signalkTheme.scss +0 -112
- package/src/tsconfig.app.json +0 -15
- package/src/tsconfig.spec.json +0 -20
- package/src/typings.d.ts +0 -5
- package/tsconfig.json +0 -24
- package/tslint.json +0 -143
- /package/{KipGaugeSample-1-1024x545.png → KipGaugeSample1-1024x545.png} +0 -0
- /package/{KipMonitor-1024x488.png → KipGaugeSample2-1024x488.png} +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { AppComponent } from './app.component';
|
|
4
|
-
|
|
5
|
-
describe('AppComponent', () => {
|
|
6
|
-
beforeEach(waitForAsync(() => {
|
|
7
|
-
TestBed.configureTestingModule({
|
|
8
|
-
declarations: [
|
|
9
|
-
AppComponent
|
|
10
|
-
],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
}));
|
|
13
|
-
|
|
14
|
-
it('should create the app', waitForAsync(() => {
|
|
15
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
16
|
-
const app = fixture.debugElement.componentInstance;
|
|
17
|
-
expect(app).toBeTruthy();
|
|
18
|
-
}));
|
|
19
|
-
|
|
20
|
-
it(`should have as title 'app'`, waitForAsync(() => {
|
|
21
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
22
|
-
const app = fixture.debugElement.componentInstance;
|
|
23
|
-
expect(app.title).toEqual('app');
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
it('should render title in a h1 tag', waitForAsync(() => {
|
|
27
|
-
const fixture = TestBed.createComponent(AppComponent);
|
|
28
|
-
fixture.detectChanges();
|
|
29
|
-
const compiled = fixture.debugElement.nativeElement;
|
|
30
|
-
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
|
|
31
|
-
}));
|
|
32
|
-
});
|
package/src/app/app.component.ts
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
4
|
-
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
5
|
-
import { Howl } from 'howler';
|
|
6
|
-
import { LayoutSplitsService } from './layout-splits.service';
|
|
7
|
-
import * as screenfull from 'screenfull';
|
|
8
|
-
|
|
9
|
-
import { AppSettingsService } from './app-settings.service';
|
|
10
|
-
import { DataSetService } from './data-set.service';
|
|
11
|
-
import { NotificationsService } from './notifications.service';
|
|
12
|
-
import { SignalKConnectionService, SignalKStatus } from './signalk-connection.service';
|
|
13
|
-
|
|
14
|
-
declare var NoSleep: any; //3rd party
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'app-root',
|
|
18
|
-
templateUrl: './app.component.html',
|
|
19
|
-
styleUrls: ['./app.component.scss']
|
|
20
|
-
})
|
|
21
|
-
export class AppComponent implements OnInit, OnDestroy {
|
|
22
|
-
|
|
23
|
-
noSleep = new NoSleep();
|
|
24
|
-
|
|
25
|
-
pageName: string = '';
|
|
26
|
-
|
|
27
|
-
unlockStatus: boolean = false;
|
|
28
|
-
unlockStatusSub: Subscription;
|
|
29
|
-
|
|
30
|
-
fullscreenStatus = false;
|
|
31
|
-
|
|
32
|
-
themeName: string;
|
|
33
|
-
themeClass: string = 'modern-dark fullheight';
|
|
34
|
-
themeNameSub: Subscription;
|
|
35
|
-
|
|
36
|
-
isNightMode: boolean = false;
|
|
37
|
-
|
|
38
|
-
appNotificationSub: Subscription;
|
|
39
|
-
connectionStatusSub: Subscription;
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
private AppSettingsService: AppSettingsService,
|
|
43
|
-
private DataSetService: DataSetService,
|
|
44
|
-
private notificationsService: NotificationsService,
|
|
45
|
-
private _snackBar: MatSnackBar,
|
|
46
|
-
private overlayContainer: OverlayContainer,
|
|
47
|
-
private LayoutSplitsService: LayoutSplitsService,
|
|
48
|
-
private signalKConnectionService: SignalKConnectionService,
|
|
49
|
-
) { }
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
ngOnInit() {
|
|
53
|
-
this.unlockStatusSub = this.AppSettingsService.getUnlockStatusAsO().subscribe(
|
|
54
|
-
status => { this.unlockStatus = status; }
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
this.themeNameSub = this.AppSettingsService.getThemeNameAsO().subscribe(
|
|
58
|
-
newTheme => {
|
|
59
|
-
this.themeClass = newTheme + ' fullheight'; // need fullheight there to set 100%height
|
|
60
|
-
if (this.themeName) {
|
|
61
|
-
this.overlayContainer.getContainerElement().classList.remove(this.themeName);
|
|
62
|
-
}
|
|
63
|
-
this.overlayContainer.getContainerElement().classList.add(newTheme);
|
|
64
|
-
this.themeName = newTheme;
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
this.DataSetService.startAllDataSets();
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
// Snackbar Notification Code
|
|
71
|
-
this.appNotificationSub = this.notificationsService.getSnackbarAppNotifications().subscribe(
|
|
72
|
-
|
|
73
|
-
appNotification => {
|
|
74
|
-
this._snackBar.open(appNotification.message, 'dismiss', {
|
|
75
|
-
duration: appNotification.duration,
|
|
76
|
-
verticalPosition: 'top'
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
if (!this.AppSettingsService.getNotificationConfig().sound.disableSound) {
|
|
80
|
-
let sound = new Howl({
|
|
81
|
-
src: ['assets/notification.mp3'],
|
|
82
|
-
autoUnlock: true,
|
|
83
|
-
autoSuspend: false,
|
|
84
|
-
autoplay: true,
|
|
85
|
-
preload: true,
|
|
86
|
-
loop: false,
|
|
87
|
-
volume: 0.3,
|
|
88
|
-
onend: function() {
|
|
89
|
-
// console.log('Finished!');
|
|
90
|
-
},
|
|
91
|
-
onloaderror: function() {
|
|
92
|
-
console.log("snackbar: player onload error");
|
|
93
|
-
},
|
|
94
|
-
onplayerror: function() {
|
|
95
|
-
console.log("snackbar: player locked");
|
|
96
|
-
this.howlPlayer.once('unlock', function() {
|
|
97
|
-
this.howlPlayer.play();
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
sound.play();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
// Connection Status Notification sub
|
|
107
|
-
this.connectionStatusSub = this.signalKConnectionService.getSignalKConnectionsStatus().subscribe(
|
|
108
|
-
status => {
|
|
109
|
-
this.displayConnectionsStatusNotification(status);
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
ngOnDestroy() {
|
|
117
|
-
this.unlockStatusSub.unsubscribe();
|
|
118
|
-
this.themeNameSub.unsubscribe();
|
|
119
|
-
this.appNotificationSub.unsubscribe();
|
|
120
|
-
this.connectionStatusSub.unsubscribe();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
displayConnectionsStatusNotification(connectionsStatus: SignalKStatus) {
|
|
124
|
-
if (connectionsStatus.operation == 1) { // starting server
|
|
125
|
-
if (!connectionsStatus.endpoint.status) {
|
|
126
|
-
this.notificationsService.sendSnackbarNotification(connectionsStatus.endpoint.message, 5000);
|
|
127
|
-
} else {
|
|
128
|
-
this.notificationsService.sendSnackbarNotification("Connected to SignalK Server.", 5000);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (connectionsStatus.operation == 3) { // URL changed/reset
|
|
132
|
-
this.notificationsService.sendSnackbarNotification("Connection Update/Reset successful.", 5000);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
setTheme(theme: string) {
|
|
137
|
-
this.AppSettingsService.setThemName(theme);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
setNightMode(nightMode: boolean) {
|
|
141
|
-
this.isNightMode = nightMode;
|
|
142
|
-
if (this.isNightMode) {
|
|
143
|
-
this.AppSettingsService.setThemName("nightMode");
|
|
144
|
-
} else {
|
|
145
|
-
this.AppSettingsService.setThemName(this.AppSettingsService.getThemeName());
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
unlockPage() {
|
|
150
|
-
if (this.unlockStatus) {
|
|
151
|
-
console.log("Locking");
|
|
152
|
-
this.unlockStatus = false;
|
|
153
|
-
} else {
|
|
154
|
-
console.log("Unlocking");
|
|
155
|
-
this.unlockStatus = true;
|
|
156
|
-
}
|
|
157
|
-
this.AppSettingsService.setUnlockStatus(this.unlockStatus);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
newPage() {
|
|
162
|
-
this.LayoutSplitsService.newRootSplit();
|
|
163
|
-
//this.router.navigate(['/page', rootNodes.findIndex(uuid => uuid == newuuid)]);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
pageDown() {
|
|
167
|
-
this.LayoutSplitsService.previousRoot();
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
pageUp() {
|
|
172
|
-
this.LayoutSplitsService.nextRoot();
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
toggleFullScreen() {
|
|
177
|
-
if (screenfull.isEnabled) {
|
|
178
|
-
if (!this.fullscreenStatus) {
|
|
179
|
-
screenfull.request();
|
|
180
|
-
this.noSleep.enable();
|
|
181
|
-
} else {
|
|
182
|
-
if (screenfull.isFullscreen) {
|
|
183
|
-
screenfull.exit();
|
|
184
|
-
}
|
|
185
|
-
this.noSleep.disable();
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
this.fullscreenStatus = !this.fullscreenStatus;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
}
|
package/src/app/app.module.ts
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { RouterModule, Routes } from '@angular/router';
|
|
4
|
-
import { FormsModule } from '@angular/forms';
|
|
5
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
6
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
7
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
8
|
-
import { MatBadgeModule } from '@angular/material/badge';
|
|
9
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
-
import { MatCardModule } from '@angular/material/card';
|
|
11
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
12
|
-
import { MatDialogModule } from '@angular/material/dialog';
|
|
13
|
-
import { MatExpansionModule } from '@angular/material/expansion';
|
|
14
|
-
import { MatInputModule } from '@angular/material/input';
|
|
15
|
-
import { MatMenuModule } from '@angular/material/menu';
|
|
16
|
-
import { MatRadioModule } from '@angular/material/radio';
|
|
17
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
18
|
-
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
19
|
-
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
20
|
-
import { MatStepperModule } from '@angular/material/stepper';
|
|
21
|
-
import { MatTabsModule } from '@angular/material/tabs';
|
|
22
|
-
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
23
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
24
|
-
import { MatListModule } from '@angular/material/list';
|
|
25
|
-
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
26
|
-
import { MatTableModule } from '@angular/material/table';
|
|
27
|
-
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
28
|
-
import { MatSortModule } from '@angular/material/sort';
|
|
29
|
-
|
|
30
|
-
import { AngularSplitModule } from 'angular-split';
|
|
31
|
-
import { AngularResizeEventModule } from 'angular-resize-event';
|
|
32
|
-
|
|
33
|
-
import { AppComponent } from './app.component';
|
|
34
|
-
import { AppHelpComponent } from './app-help/app-help.component';
|
|
35
|
-
|
|
36
|
-
import { FitTextDirective } from './fit-text.directive';
|
|
37
|
-
import { DynamicWidgetDirective } from './dynamic-widget.directive';
|
|
38
|
-
|
|
39
|
-
import { SignalKService } from './signalk.service';
|
|
40
|
-
import { SignalKConnectionService } from './signalk-connection.service';
|
|
41
|
-
import { SignalKDeltaService } from './signalk-delta.service';
|
|
42
|
-
import { SignalKFullService } from './signalk-full.service';
|
|
43
|
-
import { DataSetService } from './data-set.service';
|
|
44
|
-
import { LayoutSplitsService } from './layout-splits.service';
|
|
45
|
-
import { AppSettingsService } from './app-settings.service';
|
|
46
|
-
import { WidgetManagerService } from './widget-manager.service';
|
|
47
|
-
import { WidgetListService } from './widget-list.service';
|
|
48
|
-
import { UnitsService } from './units.service';
|
|
49
|
-
import { NotificationsService } from './notifications.service';
|
|
50
|
-
import { WidgetBlankComponent } from './widget-blank/widget-blank.component';
|
|
51
|
-
import { WidgetUnknownComponent } from './widget-unknown/widget-unknown.component';
|
|
52
|
-
import { WidgetTextGenericComponent } from './widget-text-generic/widget-text-generic.component';
|
|
53
|
-
import { UnitWindowComponent, UnitWindowModalComponent } from './unit-window/unit-window.component';
|
|
54
|
-
import { SettingsComponent } from './settings/settings.component';
|
|
55
|
-
import { RootDisplayComponent } from './root-display/root-display.component';
|
|
56
|
-
import { FilterSelfPipe } from './filter-self.pipe';
|
|
57
|
-
import { SafePipe } from './safe.pipe';
|
|
58
|
-
import { WidgetNumericComponent } from './widget-numeric/widget-numeric.component';
|
|
59
|
-
import { SettingsDatasetsComponent, SettingsDatasetsModalComponent } from './settings-datasets/settings-datasets.component';
|
|
60
|
-
import { SettingsSignalkComponent } from './settings-signalk/settings-signalk.component';
|
|
61
|
-
import { WidgetHistoricalComponent } from './widget-historical/widget-historical.component';
|
|
62
|
-
import { LayoutSplitComponent } from './layout-split/layout-split.component';
|
|
63
|
-
import { WidgetWindComponent, } from './widget-wind/widget-wind.component';
|
|
64
|
-
import { SvgWindComponent } from './svg-wind/svg-wind.component';
|
|
65
|
-
import { WidgetGaugeComponent } from './widget-gauge/widget-gauge.component';
|
|
66
|
-
import { GaugeSteelComponent } from './gauge-steel/gauge-steel.component';
|
|
67
|
-
import { WidgetTutorialComponent } from './widget-tutorial/widget-tutorial.component';
|
|
68
|
-
import { ResetConfigComponent } from './reset-config/reset-config.component';
|
|
69
|
-
import { WidgetStateComponent } from './widget-state/widget-state.component';
|
|
70
|
-
import { ModalWidgetComponent } from './modal-widget/modal-widget.component';
|
|
71
|
-
import { WidgetSwitchComponent } from './widget-switch/widget-switch.component'
|
|
72
|
-
import { ModalPathSelectorComponent } from './modal-path-selector/modal-path-selector.component';
|
|
73
|
-
import { ObjectKeysPipe } from './object-keys.pipe';
|
|
74
|
-
import { SettingsUnitsComponent } from './settings-units/settings-units.component';
|
|
75
|
-
import { SettingsZonesComponent, DialogNewZone } from './settings-zones/settings-zones.component';
|
|
76
|
-
import { WidgetIframeComponent } from './widget-iframe/widget-iframe.component';
|
|
77
|
-
import { SettingsConfigComponent } from './settings-config/settings-config.component';
|
|
78
|
-
|
|
79
|
-
import { GaugesModule } from './gauges-module/gauges.module';
|
|
80
|
-
import { WidgetGaugeNgLinearComponent } from './widget-gauge-ng-linear/widget-gauge-ng-linear.component';
|
|
81
|
-
import { WidgetGaugeNgRadialComponent } from './widget-gauge-ng-radial/widget-gauge-ng-radial.component';
|
|
82
|
-
import { AlarmMenuComponent } from './alarm-menu/alarm-menu.component';
|
|
83
|
-
import { WidgetAutopilotComponent } from './widget-autopilot/widget-autopilot.component';
|
|
84
|
-
import { SvgAutopilotComponent } from './svg-autopilot/svg-autopilot.component';
|
|
85
|
-
import { SettingsNotificationsComponent } from './settings-notifications/settings-notifications.component';
|
|
86
|
-
import { SvgSimpleLinearGaugeComponent } from './svg-simple-linear-gauge/svg-simple-linear-gauge.component';
|
|
87
|
-
import { WidgetSimpleLinearComponent } from './widget-simple-linear/widget-simple-linear.component';
|
|
88
|
-
import { DataBrowserComponent } from './data-browser/data-browser.component';
|
|
89
|
-
import { DataBrowserRowComponent, DialogUnitSelect } from './data-browser-row/data-browser-row.component';
|
|
90
|
-
|
|
91
|
-
const appRoutes: Routes = [
|
|
92
|
-
{ path: '', redirectTo: '/page/0', pathMatch: 'full' },
|
|
93
|
-
{ path: 'page/:id', component: RootDisplayComponent },
|
|
94
|
-
{ path: 'settings', component: SettingsComponent },
|
|
95
|
-
{ path: 'help', component: AppHelpComponent },
|
|
96
|
-
{ path: 'data', component: DataBrowserComponent },
|
|
97
|
-
{ path: 'reset', component: ResetConfigComponent },
|
|
98
|
-
{ path: 'demo', component: ResetConfigComponent }
|
|
99
|
-
];
|
|
100
|
-
|
|
101
|
-
@NgModule({
|
|
102
|
-
declarations: [
|
|
103
|
-
AppComponent,
|
|
104
|
-
AppHelpComponent,
|
|
105
|
-
SettingsComponent,
|
|
106
|
-
UnitWindowComponent,
|
|
107
|
-
UnitWindowModalComponent,
|
|
108
|
-
WidgetBlankComponent,
|
|
109
|
-
DynamicWidgetDirective,
|
|
110
|
-
WidgetUnknownComponent,
|
|
111
|
-
WidgetTextGenericComponent,
|
|
112
|
-
FitTextDirective,
|
|
113
|
-
RootDisplayComponent,
|
|
114
|
-
FilterSelfPipe,
|
|
115
|
-
SafePipe,
|
|
116
|
-
WidgetNumericComponent,
|
|
117
|
-
SettingsDatasetsComponent,
|
|
118
|
-
SettingsDatasetsModalComponent,
|
|
119
|
-
SettingsSignalkComponent,
|
|
120
|
-
WidgetHistoricalComponent,
|
|
121
|
-
LayoutSplitComponent,
|
|
122
|
-
WidgetWindComponent,
|
|
123
|
-
SvgWindComponent,
|
|
124
|
-
WidgetGaugeComponent,
|
|
125
|
-
GaugeSteelComponent,
|
|
126
|
-
WidgetGaugeNgLinearComponent,
|
|
127
|
-
WidgetGaugeNgRadialComponent,
|
|
128
|
-
SettingsConfigComponent,
|
|
129
|
-
WidgetTutorialComponent,
|
|
130
|
-
ResetConfigComponent,
|
|
131
|
-
WidgetStateComponent,
|
|
132
|
-
ModalWidgetComponent,
|
|
133
|
-
WidgetSwitchComponent,
|
|
134
|
-
ModalPathSelectorComponent,
|
|
135
|
-
ObjectKeysPipe,
|
|
136
|
-
SettingsUnitsComponent,
|
|
137
|
-
SettingsZonesComponent,
|
|
138
|
-
WidgetIframeComponent,
|
|
139
|
-
AlarmMenuComponent,
|
|
140
|
-
WidgetAutopilotComponent,
|
|
141
|
-
SvgAutopilotComponent,
|
|
142
|
-
SettingsNotificationsComponent,
|
|
143
|
-
SvgSimpleLinearGaugeComponent,
|
|
144
|
-
WidgetSimpleLinearComponent,
|
|
145
|
-
DataBrowserComponent,
|
|
146
|
-
DataBrowserRowComponent,
|
|
147
|
-
DialogUnitSelect,
|
|
148
|
-
DialogNewZone,
|
|
149
|
-
],
|
|
150
|
-
imports: [
|
|
151
|
-
BrowserModule,
|
|
152
|
-
FormsModule,
|
|
153
|
-
ReactiveFormsModule,
|
|
154
|
-
HttpClientModule,
|
|
155
|
-
RouterModule.forRoot(appRoutes, { useHash: true /* , enableTracing: true */, relativeLinkResolution: 'legacy' } ),
|
|
156
|
-
AngularSplitModule,
|
|
157
|
-
AngularResizeEventModule,
|
|
158
|
-
BrowserAnimationsModule,
|
|
159
|
-
|
|
160
|
-
MatMenuModule,
|
|
161
|
-
MatButtonModule,
|
|
162
|
-
MatTooltipModule,
|
|
163
|
-
MatDialogModule,
|
|
164
|
-
MatSelectModule,
|
|
165
|
-
MatToolbarModule,
|
|
166
|
-
MatCheckboxModule,
|
|
167
|
-
MatRadioModule,
|
|
168
|
-
MatTabsModule,
|
|
169
|
-
MatCardModule,
|
|
170
|
-
MatSnackBarModule,
|
|
171
|
-
MatStepperModule,
|
|
172
|
-
MatInputModule,
|
|
173
|
-
MatExpansionModule,
|
|
174
|
-
MatBadgeModule,
|
|
175
|
-
MatSlideToggleModule,
|
|
176
|
-
MatListModule,
|
|
177
|
-
MatAutocompleteModule,
|
|
178
|
-
GaugesModule,
|
|
179
|
-
MatTableModule,
|
|
180
|
-
MatPaginatorModule,
|
|
181
|
-
MatSortModule,
|
|
182
|
-
],
|
|
183
|
-
providers: [
|
|
184
|
-
SignalKService,
|
|
185
|
-
SignalKConnectionService,
|
|
186
|
-
SignalKDeltaService,
|
|
187
|
-
SignalKFullService,
|
|
188
|
-
DataSetService,
|
|
189
|
-
LayoutSplitsService,
|
|
190
|
-
WidgetListService,
|
|
191
|
-
WidgetManagerService,
|
|
192
|
-
UnitsService,
|
|
193
|
-
AppSettingsService,
|
|
194
|
-
NotificationsService
|
|
195
|
-
],
|
|
196
|
-
bootstrap: [AppComponent]
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
export class AppModule {
|
|
200
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { IAppConfig, IWidgetConfig, ILayoutConfig, IThemeConfig } from "./app-settings.service";
|
|
2
|
-
|
|
3
|
-
export const DefaultAppConfig: IAppConfig = {
|
|
4
|
-
"configVersion": 6,
|
|
5
|
-
"signalKUrl": "", // get's overwritten with host
|
|
6
|
-
"kipUUID": newUuid(),
|
|
7
|
-
"signalKToken": null,
|
|
8
|
-
"dataSets": [],
|
|
9
|
-
"unitDefaults": null,
|
|
10
|
-
"notificationConfig": null,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const DefaultWidgetConfig: IWidgetConfig = {
|
|
14
|
-
"widgets": [
|
|
15
|
-
{
|
|
16
|
-
"uuid": "widgetno-1xxx-4xxx-yxxx-xxxxxxxxxxxx",
|
|
17
|
-
"type": "WidgetTutorial",
|
|
18
|
-
"config": null
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const DefaultLayoutConfig: ILayoutConfig = {
|
|
24
|
-
"rootSplits": [
|
|
25
|
-
"isplitsx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
|
|
26
|
-
],
|
|
27
|
-
"splitSets": [
|
|
28
|
-
{
|
|
29
|
-
"uuid": "isplitsx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",
|
|
30
|
-
"direction": "horizontal",
|
|
31
|
-
"splitAreas": [
|
|
32
|
-
{
|
|
33
|
-
"uuid": "widgetno-1xxx-4xxx-yxxx-xxxxxxxxxxxx",
|
|
34
|
-
"type": "widget",
|
|
35
|
-
"size": 100
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const DefaultThemeConfig: IThemeConfig = {
|
|
43
|
-
"themeName": "modern-dark"
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
function newUuid() {
|
|
48
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
|
49
|
-
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
|
|
50
|
-
return v.toString(16);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const DefaultNotificationConfig = {
|
|
2
|
-
"disableNotifications": false,
|
|
3
|
-
"menuGrouping": true,
|
|
4
|
-
"security": {
|
|
5
|
-
"disableSecurity": true,
|
|
6
|
-
},
|
|
7
|
-
"devices": {
|
|
8
|
-
"disableDevices": false,
|
|
9
|
-
"showNormalState": false,
|
|
10
|
-
},
|
|
11
|
-
"sound": {
|
|
12
|
-
"disableSound": false,
|
|
13
|
-
"muteNormal": false,
|
|
14
|
-
"muteWarning": false,
|
|
15
|
-
"muteAlert": false,
|
|
16
|
-
"muteAlarm": false,
|
|
17
|
-
"muteEmergency": false,
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IUnitDefaults } from './units.service';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const DefaultUnitsConfig: IUnitDefaults = {
|
|
5
|
-
"Unitless": 'unitless',
|
|
6
|
-
"Speed": 'knots',
|
|
7
|
-
"Flow": 'l/h',
|
|
8
|
-
"Temperature": 'celsius',
|
|
9
|
-
"Length": 'm',
|
|
10
|
-
"Volume": 'liter',
|
|
11
|
-
"Current": 'A',
|
|
12
|
-
"Potential": 'V',
|
|
13
|
-
"Charge": 'C',
|
|
14
|
-
"Power": 'W',
|
|
15
|
-
"Energy": 'J',
|
|
16
|
-
"Pressure": 'mmHg',
|
|
17
|
-
"Density": 'kg/m3',
|
|
18
|
-
"Time": 'Hours',
|
|
19
|
-
"Angular Velocity": 'deg/min',
|
|
20
|
-
"Angle": 'deg',
|
|
21
|
-
"Frequency": 'Hz',
|
|
22
|
-
"Ratio": 'ratio'
|
|
23
|
-
}
|