@mxtommy/kip 1.2.3 → 2.0.0
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 +180 -135
- package/CONTRIBUTORS.md +16 -16
- package/KipGaugeSample3-1024x508.png +0 -0
- package/LICENSE +21 -0
- package/README.md +140 -102
- package/package.json +93 -84
- package/public/3rdpartylicenses.txt +68 -139
- package/public/assets/NoSleep.min.js +2 -2
- package/public/assets/fontawesome6/css/all.min.css +6 -0
- package/public/assets/fontawesome6/webfonts/fa-brands-400.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-brands-400.woff2 +0 -0
- package/public/assets/fontawesome6/webfonts/fa-regular-400.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-regular-400.woff2 +0 -0
- package/public/assets/fontawesome6/webfonts/fa-solid-900.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-solid-900.woff2 +0 -0
- package/public/assets/fontawesome6/webfonts/fa-v4compatibility.ttf +0 -0
- package/public/assets/fontawesome6/webfonts/fa-v4compatibility.woff2 +0 -0
- package/public/assets/icon-192x192.png +0 -0
- package/public/assets/icon-256x256.png +0 -0
- package/public/assets/icon-384x384.png +0 -0
- package/public/assets/icon-512x512.png +0 -0
- package/public/assets/icon-64x64.png +0 -0
- package/public/assets/steelseries-min.js +25 -25
- package/public/assets/steelseries-min.js.map +8 -8
- package/public/assets/steelseries.js +15834 -15834
- package/public/assets/svg-autopilot-inkscape-plain.svg +983 -983
- package/public/assets/svg-wind-inkscape.svg +1358 -1358
- package/public/assets/tween.js +381 -381
- package/public/index.html +19 -20
- package/public/main.9dba30de44eed02b.js +1 -0
- package/public/manifest.json +38 -0
- package/public/polyfills.d1da7d2e907c253a.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 -153
- 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/public/assets/font-awesome/HELP-US-OUT.txt +0 -7
- package/public/assets/font-awesome/css/font-awesome.css +0 -2337
- package/public/assets/font-awesome/css/font-awesome.min.css +0 -4
- package/public/assets/font-awesome/desktop.ini +0 -4
- package/public/assets/font-awesome/fonts/FontAwesome.otf +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/public/assets/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/public/assets/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/public/assets/font-awesome/less/animated.less +0 -34
- package/public/assets/font-awesome/less/bordered-pulled.less +0 -25
- package/public/assets/font-awesome/less/core.less +0 -12
- package/public/assets/font-awesome/less/fixed-width.less +0 -6
- package/public/assets/font-awesome/less/font-awesome.less +0 -18
- package/public/assets/font-awesome/less/icons.less +0 -789
- package/public/assets/font-awesome/less/larger.less +0 -13
- package/public/assets/font-awesome/less/list.less +0 -19
- package/public/assets/font-awesome/less/mixins.less +0 -60
- package/public/assets/font-awesome/less/path.less +0 -15
- package/public/assets/font-awesome/less/rotated-flipped.less +0 -20
- package/public/assets/font-awesome/less/screen-reader.less +0 -5
- package/public/assets/font-awesome/less/stacked.less +0 -20
- package/public/assets/font-awesome/less/variables.less +0 -800
- package/public/assets/font-awesome/scss/_animated.scss +0 -34
- package/public/assets/font-awesome/scss/_bordered-pulled.scss +0 -25
- package/public/assets/font-awesome/scss/_core.scss +0 -12
- package/public/assets/font-awesome/scss/_fixed-width.scss +0 -6
- package/public/assets/font-awesome/scss/_icons.scss +0 -789
- package/public/assets/font-awesome/scss/_larger.scss +0 -13
- package/public/assets/font-awesome/scss/_list.scss +0 -19
- package/public/assets/font-awesome/scss/_mixins.scss +0 -60
- package/public/assets/font-awesome/scss/_path.scss +0 -15
- package/public/assets/font-awesome/scss/_rotated-flipped.scss +0 -20
- package/public/assets/font-awesome/scss/_screen-reader.scss +0 -5
- package/public/assets/font-awesome/scss/_stacked.scss +0 -20
- package/public/assets/font-awesome/scss/_variables.scss +0 -800
- package/public/assets/font-awesome/scss/font-awesome.scss +0 -18
- package/public/main-es2018.ab0adc5af3ab3e70c849.js +0 -1
- package/public/main-es5.ab0adc5af3ab3e70c849.js +0 -1
- package/public/polyfills-es2018.713f95af1f028e444854.js +0 -1
- package/public/polyfills-es5.c78877945523541d2597.js +0 -1
- package/public/runtime-es2018.a4dadbc03350107420a4.js +0 -1
- package/public/runtime-es5.a4dadbc03350107420a4.js +0 -1
- package/public/styles.71bb0d04cad96b5efbe1.css +0 -19
- package/src/app/alarm-menu/alarm-menu.component.html +0 -55
- package/src/app/alarm-menu/alarm-menu.component.scss +0 -53
- 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 -192
- 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 -85
- 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 -781
- package/src/app/widget-blank/widget-blank.component.html +0 -5
- package/src/app/widget-blank/widget-blank.component.scss +0 -22
- 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 -93
- 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/font-awesome/HELP-US-OUT.txt +0 -7
- package/src/assets/font-awesome/css/font-awesome.css +0 -2337
- package/src/assets/font-awesome/css/font-awesome.min.css +0 -4
- package/src/assets/font-awesome/desktop.ini +0 -4
- package/src/assets/font-awesome/fonts/FontAwesome.otf +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/src/assets/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/src/assets/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/src/assets/font-awesome/less/animated.less +0 -34
- package/src/assets/font-awesome/less/bordered-pulled.less +0 -25
- package/src/assets/font-awesome/less/core.less +0 -12
- package/src/assets/font-awesome/less/fixed-width.less +0 -6
- package/src/assets/font-awesome/less/font-awesome.less +0 -18
- package/src/assets/font-awesome/less/icons.less +0 -789
- package/src/assets/font-awesome/less/larger.less +0 -13
- package/src/assets/font-awesome/less/list.less +0 -19
- package/src/assets/font-awesome/less/mixins.less +0 -60
- package/src/assets/font-awesome/less/path.less +0 -15
- package/src/assets/font-awesome/less/rotated-flipped.less +0 -20
- package/src/assets/font-awesome/less/screen-reader.less +0 -5
- package/src/assets/font-awesome/less/stacked.less +0 -20
- package/src/assets/font-awesome/less/variables.less +0 -800
- package/src/assets/font-awesome/scss/_animated.scss +0 -34
- package/src/assets/font-awesome/scss/_bordered-pulled.scss +0 -25
- package/src/assets/font-awesome/scss/_core.scss +0 -12
- package/src/assets/font-awesome/scss/_fixed-width.scss +0 -6
- package/src/assets/font-awesome/scss/_icons.scss +0 -789
- package/src/assets/font-awesome/scss/_larger.scss +0 -13
- package/src/assets/font-awesome/scss/_list.scss +0 -19
- package/src/assets/font-awesome/scss/_mixins.scss +0 -60
- package/src/assets/font-awesome/scss/_path.scss +0 -15
- package/src/assets/font-awesome/scss/_rotated-flipped.scss +0 -20
- package/src/assets/font-awesome/scss/_screen-reader.scss +0 -5
- package/src/assets/font-awesome/scss/_stacked.scss +0 -20
- package/src/assets/font-awesome/scss/_variables.scss +0 -800
- package/src/assets/font-awesome/scss/font-awesome.scss +0 -18
- 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/polyfills.ts +0 -76
- package/src/styles.css +0 -47
- package/src/styles.scss +0 -157
- package/src/test.ts +0 -32
- package/src/themes/darkBlueTheme.scss +0 -116
- package/src/themes/defaultTheme.scss +0 -49
- package/src/themes/highContrastTheme.scss +0 -46
- package/src/themes/modernTheme.scss +0 -142
- package/src/themes/nightMode.scss +0 -184
- package/src/themes/platypusTheme.scss +0 -79
- package/src/themes/signalkTheme.scss +0 -111
- 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,424 +0,0 @@
|
|
|
1
|
-
import { ViewChild, ElementRef, Component, OnInit, AfterContentInit, Input, OnDestroy } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
4
|
-
import { ResizedEvent } from 'angular-resize-event';
|
|
5
|
-
|
|
6
|
-
import { SignalKService } from '../signalk.service';
|
|
7
|
-
import { ModalWidgetComponent } from '../modal-widget/modal-widget.component';
|
|
8
|
-
import { WidgetManagerService, IWidget, IWidgetConfig } from '../widget-manager.service';
|
|
9
|
-
import { UnitsService } from '../units.service' ;
|
|
10
|
-
import { AppSettingsService, IZone, ZoneState } from '../app-settings.service';
|
|
11
|
-
import { LinearGauge, LinearGaugeOptions } from '@biacsics/ng-canvas-gauges';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const defaultConfig: IWidgetConfig = {
|
|
15
|
-
displayName: null,
|
|
16
|
-
filterSelfPaths: true,
|
|
17
|
-
paths: {
|
|
18
|
-
"gaugePath": {
|
|
19
|
-
description: "Numeric Data",
|
|
20
|
-
path: null,
|
|
21
|
-
source: null,
|
|
22
|
-
pathType: "number",
|
|
23
|
-
isPathConfigurable: true,
|
|
24
|
-
convertUnitTo: "unitless"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
gaugeType: 'ngLinearVertical', //ngLinearVertical or ngLinearHorizontal
|
|
28
|
-
gaugeTicks: false,
|
|
29
|
-
minValue: 0,
|
|
30
|
-
maxValue: 100,
|
|
31
|
-
numInt: 1,
|
|
32
|
-
numDecimal: 0,
|
|
33
|
-
barColor: 'accent',
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
interface IDataHighlight extends Array<{
|
|
37
|
-
from : number;
|
|
38
|
-
to : number;
|
|
39
|
-
color: string;
|
|
40
|
-
}> {};
|
|
41
|
-
|
|
42
|
-
@Component({
|
|
43
|
-
selector: 'app-widget-gauge-ng-linear',
|
|
44
|
-
templateUrl: './widget-gauge-ng-linear.component.html',
|
|
45
|
-
styleUrls: ['./widget-gauge-ng-linear.component.scss']
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
export class WidgetGaugeNgLinearComponent implements OnInit, OnDestroy, AfterContentInit {
|
|
49
|
-
@ViewChild('linearWrapperDiv', {static: true, read: ElementRef}) private wrapper: ElementRef;
|
|
50
|
-
@ViewChild('linearGauge', {static: true, read: ElementRef}) protected linearGauge: ElementRef;
|
|
51
|
-
|
|
52
|
-
@Input('widgetUUID') widgetUUID: string;
|
|
53
|
-
@Input('unlockStatus') unlockStatus: boolean;
|
|
54
|
-
|
|
55
|
-
@ViewChild('primary', {static: true, read: ElementRef}) private primaryElement: ElementRef;
|
|
56
|
-
@ViewChild('accent', {static: true, read: ElementRef}) private accentElement: ElementRef;
|
|
57
|
-
@ViewChild('warn', {static: true, read: ElementRef}) private warnElement: ElementRef;
|
|
58
|
-
@ViewChild('primaryDark', {static: true, read: ElementRef}) private primaryDarkElement: ElementRef;
|
|
59
|
-
@ViewChild('accentDark', {static: true, read: ElementRef}) private accentDarkElement: ElementRef;
|
|
60
|
-
@ViewChild('warnDark', {static: true, read: ElementRef}) private warnDarkElement: ElementRef;
|
|
61
|
-
@ViewChild('background', {static: true, read: ElementRef}) private backgroundElement: ElementRef;
|
|
62
|
-
|
|
63
|
-
activeWidget: IWidget;
|
|
64
|
-
config: IWidgetConfig;
|
|
65
|
-
|
|
66
|
-
public dataValue = 0;
|
|
67
|
-
public dataValueTrimmed = 0;
|
|
68
|
-
|
|
69
|
-
valueSub: Subscription = null;
|
|
70
|
-
|
|
71
|
-
// dynamics theme support
|
|
72
|
-
themeNameSub: Subscription = null;
|
|
73
|
-
|
|
74
|
-
public gaugeOptions = {} as LinearGaugeOptions;
|
|
75
|
-
|
|
76
|
-
public isGaugeVertical: Boolean = true;
|
|
77
|
-
|
|
78
|
-
zones: Array<IZone> = [];
|
|
79
|
-
zonesSub: Subscription;
|
|
80
|
-
|
|
81
|
-
constructor(
|
|
82
|
-
public dialog:MatDialog,
|
|
83
|
-
private SignalKService: SignalKService,
|
|
84
|
-
private WidgetManagerService: WidgetManagerService,
|
|
85
|
-
private UnitsService: UnitsService,
|
|
86
|
-
private AppSettingsService: AppSettingsService, // need for theme change subscription
|
|
87
|
-
) {}
|
|
88
|
-
|
|
89
|
-
ngOnInit() {
|
|
90
|
-
this.activeWidget = this.WidgetManagerService.getWidget(this.widgetUUID);
|
|
91
|
-
if (this.activeWidget.config === null) {
|
|
92
|
-
// no data, let's set some!
|
|
93
|
-
this.WidgetManagerService.updateWidgetConfig(this.widgetUUID, defaultConfig);
|
|
94
|
-
this.config = defaultConfig; // load default config.
|
|
95
|
-
} else {
|
|
96
|
-
this.config = this.activeWidget.config;
|
|
97
|
-
}
|
|
98
|
-
this.subscribePath();
|
|
99
|
-
this.subscribeTheme();
|
|
100
|
-
this.subscribeZones();
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
ngOnDestroy() {
|
|
104
|
-
this.unsubscribePath();
|
|
105
|
-
this.unsubscribeTheme();
|
|
106
|
-
this.unsubscribeZones();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
ngAfterContentInit(){
|
|
110
|
-
this.updateGaugeConfig();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
subscribePath() {
|
|
114
|
-
this.unsubscribePath();
|
|
115
|
-
if (typeof(this.config.paths['gaugePath'].path) != 'string') { return } // nothing to sub to...
|
|
116
|
-
|
|
117
|
-
this.valueSub = this.SignalKService.subscribePath(this.widgetUUID, this.config.paths['gaugePath'].path, this.config.paths['gaugePath'].source).subscribe(
|
|
118
|
-
newValue => {
|
|
119
|
-
this.dataValue = this.UnitsService.convertUnit(this.config.paths['gaugePath'].convertUnitTo, newValue.value);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
// set colors for zone state
|
|
123
|
-
switch (newValue.state) {
|
|
124
|
-
case ZoneState.warning:
|
|
125
|
-
this.gaugeOptions.colorValueText = getComputedStyle(this.warnDarkElement.nativeElement).color;
|
|
126
|
-
break;
|
|
127
|
-
case ZoneState.alarm:
|
|
128
|
-
this.gaugeOptions.colorValueText = getComputedStyle(this.warnDarkElement.nativeElement).color;
|
|
129
|
-
break;
|
|
130
|
-
default:
|
|
131
|
-
this.gaugeOptions.colorValueText = getComputedStyle(this.wrapper.nativeElement).color;
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
unsubscribePath() {
|
|
140
|
-
if (this.valueSub !== null) {
|
|
141
|
-
this.valueSub.unsubscribe();
|
|
142
|
-
this.valueSub = null;
|
|
143
|
-
this.SignalKService.unsubscribePath(this.widgetUUID, this.config.paths['gaugePath'].path)
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Subscribe to theme event
|
|
148
|
-
subscribeTheme() {
|
|
149
|
-
this.themeNameSub = this.AppSettingsService.getThemeNameAsO().subscribe(
|
|
150
|
-
themeChange => {
|
|
151
|
-
setTimeout(() => { // delay so browser getComputedStyles has time to complet theme style change.
|
|
152
|
-
this.updateGaugeConfig();
|
|
153
|
-
}, 50);
|
|
154
|
-
})
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
unsubscribeTheme(){
|
|
158
|
-
if (this.themeNameSub !== null) {
|
|
159
|
-
this.themeNameSub.unsubscribe();
|
|
160
|
-
this.themeNameSub = null;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// Subscribe to Zones
|
|
165
|
-
subscribeZones() {
|
|
166
|
-
this.zonesSub = this.AppSettingsService.getZonesAsO().subscribe(
|
|
167
|
-
zones => {
|
|
168
|
-
this.zones = zones;
|
|
169
|
-
this.updateGaugeConfig();
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
unsubscribeZones(){
|
|
174
|
-
if (this.zonesSub !== null) {
|
|
175
|
-
this.zonesSub.unsubscribe();
|
|
176
|
-
this.zonesSub = null;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
openWidgetSettings() {
|
|
181
|
-
let dialogRef = this.dialog.open(ModalWidgetComponent, {
|
|
182
|
-
width: '80%',
|
|
183
|
-
data: this.config
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
dialogRef.afterClosed().subscribe(result => {
|
|
187
|
-
// save new settings
|
|
188
|
-
if (result) {
|
|
189
|
-
console.log(result);
|
|
190
|
-
this.unsubscribePath(); //unsub now as we will change variables so wont know what was subbed before...
|
|
191
|
-
this.config = result;
|
|
192
|
-
this.WidgetManagerService.updateWidgetConfig(this.widgetUUID, this.config);
|
|
193
|
-
this.subscribePath();
|
|
194
|
-
this.updateGaugeConfig();
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
updateGaugeConfig(){
|
|
200
|
-
//// Hack to get Theme colors using hidden minxin, DIV and @ViewChild
|
|
201
|
-
let themePaletteColor = "";
|
|
202
|
-
let themePaletteDarkColor = "";
|
|
203
|
-
|
|
204
|
-
this.gaugeOptions.colorTitle = this.gaugeOptions.colorUnits = this.gaugeOptions.colorValueText = window.getComputedStyle(this.wrapper.nativeElement).color;
|
|
205
|
-
|
|
206
|
-
this.gaugeOptions.colorPlate = window.getComputedStyle(this.wrapper.nativeElement).backgroundColor;
|
|
207
|
-
this.gaugeOptions.colorBar = getComputedStyle(this.backgroundElement.nativeElement).color;
|
|
208
|
-
this.gaugeOptions.colorMajorTicks = this.gaugeOptions.colorTitle;
|
|
209
|
-
this.gaugeOptions.colorMinorTicks = this.gaugeOptions.colorTitle;
|
|
210
|
-
|
|
211
|
-
this.gaugeOptions.colorNeedleEnd = "";
|
|
212
|
-
this.gaugeOptions.colorNeedleShadowUp = "";
|
|
213
|
-
this.gaugeOptions.colorNeedleShadowDown = "black";
|
|
214
|
-
|
|
215
|
-
switch (this.config.barColor) {
|
|
216
|
-
case "primary":
|
|
217
|
-
themePaletteColor = getComputedStyle(this.primaryElement.nativeElement).color;
|
|
218
|
-
themePaletteDarkColor = getComputedStyle(this.primaryDarkElement.nativeElement).color;
|
|
219
|
-
this.gaugeOptions.colorBarProgress = themePaletteColor;
|
|
220
|
-
this.gaugeOptions.colorBarProgressEnd = themePaletteDarkColor;
|
|
221
|
-
this.gaugeOptions.colorNeedle = themePaletteDarkColor;
|
|
222
|
-
this.gaugeOptions.needleWidth = 5;
|
|
223
|
-
break;
|
|
224
|
-
|
|
225
|
-
case "accent":
|
|
226
|
-
themePaletteColor = getComputedStyle(this.accentElement.nativeElement).color;
|
|
227
|
-
themePaletteDarkColor = getComputedStyle(this.accentDarkElement.nativeElement).color;
|
|
228
|
-
this.gaugeOptions.colorBarProgress = themePaletteColor;
|
|
229
|
-
this.gaugeOptions.colorBarProgressEnd = themePaletteDarkColor;
|
|
230
|
-
this.gaugeOptions.colorNeedle = themePaletteDarkColor;
|
|
231
|
-
this.gaugeOptions.needleWidth = 5;
|
|
232
|
-
break;
|
|
233
|
-
|
|
234
|
-
case "warn":
|
|
235
|
-
themePaletteColor = getComputedStyle(this.warnElement.nativeElement).color;
|
|
236
|
-
themePaletteDarkColor = getComputedStyle(this.warnDarkElement.nativeElement).color;
|
|
237
|
-
this.gaugeOptions.colorBarProgress = themePaletteColor;
|
|
238
|
-
this.gaugeOptions.colorBarProgressEnd = themePaletteDarkColor;
|
|
239
|
-
this.gaugeOptions.colorNeedle = themePaletteDarkColor;
|
|
240
|
-
this.gaugeOptions.needleWidth = 5;
|
|
241
|
-
break;
|
|
242
|
-
|
|
243
|
-
case "nobar":
|
|
244
|
-
themePaletteColor = getComputedStyle(this.backgroundElement.nativeElement).color;
|
|
245
|
-
themePaletteDarkColor = getComputedStyle(this.warnDarkElement.nativeElement).color;
|
|
246
|
-
this.gaugeOptions.colorBar = themePaletteColor;
|
|
247
|
-
this.gaugeOptions.colorBarProgress = themePaletteColor;
|
|
248
|
-
this.gaugeOptions.colorBarProgressEnd = themePaletteColor;
|
|
249
|
-
this.gaugeOptions.colorNeedle = themePaletteDarkColor;
|
|
250
|
-
this.gaugeOptions.needleWidth = 20;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
default:
|
|
254
|
-
break;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// highlights
|
|
258
|
-
let myZones: IDataHighlight = [];
|
|
259
|
-
this.zones.forEach(zone => {
|
|
260
|
-
// get zones for our path
|
|
261
|
-
if (zone.path == this.config.paths['gaugePath'].path) {
|
|
262
|
-
let lower = zone.lower || this.config.minValue;
|
|
263
|
-
let upper = zone.upper || this.config.maxValue;
|
|
264
|
-
let color: string;
|
|
265
|
-
switch (zone.state) {
|
|
266
|
-
case 1:
|
|
267
|
-
color = getComputedStyle(this.warnElement.nativeElement).color;
|
|
268
|
-
break;
|
|
269
|
-
case ZoneState.alarm:
|
|
270
|
-
color = getComputedStyle(this.warnDarkElement.nativeElement).color;
|
|
271
|
-
break;
|
|
272
|
-
default:
|
|
273
|
-
color = getComputedStyle(this.primaryElement.nativeElement).color;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
myZones.push({from: lower, to: upper, color: color});
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
this.gaugeOptions.highlights = myZones;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
// Config storage values
|
|
283
|
-
this.gaugeOptions.minValue = this.config.minValue;
|
|
284
|
-
this.gaugeOptions.maxValue = this.config.maxValue;
|
|
285
|
-
this.gaugeOptions.valueInt = this.config.numInt;
|
|
286
|
-
this.gaugeOptions.valueDec = this.config.numDecimal;
|
|
287
|
-
|
|
288
|
-
this.gaugeOptions.majorTicksInt = this.config.numInt;
|
|
289
|
-
this.gaugeOptions.majorTicksDec = this.config.numDecimal;
|
|
290
|
-
|
|
291
|
-
if (this.config.gaugeTicks) {
|
|
292
|
-
this.gaugeOptions.colorMajorTicks = this.gaugeOptions.colorNumbers = this.gaugeOptions.colorMinorTicks = this.gaugeOptions.colorTitle;
|
|
293
|
-
} else {
|
|
294
|
-
this.gaugeOptions.colorMajorTicks = this.gaugeOptions.colorNumbers = this.gaugeOptions.colorMinorTicks = "";
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
this.gaugeOptions.valueBox = true;
|
|
298
|
-
this.gaugeOptions.valueBoxWidth = 100;
|
|
299
|
-
this.gaugeOptions.valueBoxBorderRadius = 0;
|
|
300
|
-
|
|
301
|
-
this.gaugeOptions.needle = true;
|
|
302
|
-
this.gaugeOptions.needleType = "line";
|
|
303
|
-
this.gaugeOptions.needleShadow = false;
|
|
304
|
-
this.gaugeOptions.needleSide = "both";
|
|
305
|
-
|
|
306
|
-
// Vertical
|
|
307
|
-
if (this.config.gaugeType == 'ngLinearVertical'){
|
|
308
|
-
this.isGaugeVertical = true; // Changes div wrapper class to respect aspect ratio
|
|
309
|
-
this.gaugeOptions.barLength = 75;
|
|
310
|
-
this.gaugeOptions.fontUnitsSize = 40;
|
|
311
|
-
this.gaugeOptions.fontTitleSize = 40;
|
|
312
|
-
|
|
313
|
-
// Vertical With ticks
|
|
314
|
-
if (this.config.gaugeTicks == true) {
|
|
315
|
-
this.gaugeOptions.barWidth = 30;
|
|
316
|
-
|
|
317
|
-
this.gaugeOptions.needleStart = -45;
|
|
318
|
-
this.gaugeOptions.needleEnd = 55;
|
|
319
|
-
|
|
320
|
-
this.gaugeOptions.exactTicks = false;
|
|
321
|
-
this.gaugeOptions.tickSide = "right";
|
|
322
|
-
this.gaugeOptions.ticksWidth = 8;
|
|
323
|
-
this.gaugeOptions.ticksPadding = 4;
|
|
324
|
-
|
|
325
|
-
this.gaugeOptions.strokeTicks = false;
|
|
326
|
-
this.gaugeOptions.majorTicks = [this.config.minValue, this.config.maxValue];
|
|
327
|
-
|
|
328
|
-
this.gaugeOptions.numberSide = "right";
|
|
329
|
-
this.gaugeOptions.numbersMargin = 0;
|
|
330
|
-
this.gaugeOptions.fontNumbersSize = 25;
|
|
331
|
-
|
|
332
|
-
this.gaugeOptions.minorTicks = 10;
|
|
333
|
-
this.gaugeOptions.ticksWidthMinor = 4;
|
|
334
|
-
|
|
335
|
-
this.gaugeOptions.highlightsWidth = 15;
|
|
336
|
-
}
|
|
337
|
-
else {
|
|
338
|
-
// Vertical No ticks
|
|
339
|
-
this.gaugeOptions.barWidth = 100;
|
|
340
|
-
|
|
341
|
-
this.gaugeOptions.needleStart = 0;
|
|
342
|
-
this.gaugeOptions.needleEnd = 100;
|
|
343
|
-
|
|
344
|
-
this.gaugeOptions.ticksWidth = 0;
|
|
345
|
-
this.gaugeOptions.strokeTicks = false;
|
|
346
|
-
this.gaugeOptions.majorTicks = [];
|
|
347
|
-
|
|
348
|
-
this.gaugeOptions.ticksPadding = 0;
|
|
349
|
-
this.gaugeOptions.minorTicks = 0;
|
|
350
|
-
this.gaugeOptions.ticksWidthMinor = 0;
|
|
351
|
-
this.gaugeOptions.numbersMargin = 0;
|
|
352
|
-
this.gaugeOptions.fontNumbersSize = 0;
|
|
353
|
-
|
|
354
|
-
this.gaugeOptions.highlightsWidth = 15;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
// horizontal
|
|
359
|
-
this.isGaugeVertical = false; // Changes div wrapper class to respect aspect ratio
|
|
360
|
-
this.gaugeOptions.barLength = 80;
|
|
361
|
-
this.gaugeOptions.fontTitleSize = 45;
|
|
362
|
-
this.gaugeOptions.fontUnitsSize = 35;
|
|
363
|
-
|
|
364
|
-
// horizontal With ticks
|
|
365
|
-
this.gaugeOptions.barWidth = 40;
|
|
366
|
-
if (this.config.gaugeTicks == true) {
|
|
367
|
-
|
|
368
|
-
this.gaugeOptions.exactTicks = false;
|
|
369
|
-
this.gaugeOptions.barWidth = 30;
|
|
370
|
-
|
|
371
|
-
this.gaugeOptions.needleStart = -45;
|
|
372
|
-
this.gaugeOptions.needleEnd = 56;
|
|
373
|
-
|
|
374
|
-
this.gaugeOptions.tickSide = "right";
|
|
375
|
-
this.gaugeOptions.ticksWidth = 8;
|
|
376
|
-
this.gaugeOptions.ticksPadding = 5;
|
|
377
|
-
|
|
378
|
-
this.gaugeOptions.strokeTicks = false;
|
|
379
|
-
this.gaugeOptions.majorTicks = [this.config.minValue, this.config.maxValue];
|
|
380
|
-
|
|
381
|
-
this.gaugeOptions.numberSide = "right";
|
|
382
|
-
this.gaugeOptions.numbersMargin = -5;
|
|
383
|
-
this.gaugeOptions.fontNumbersSize = 25;
|
|
384
|
-
|
|
385
|
-
this.gaugeOptions.minorTicks = 10;
|
|
386
|
-
this.gaugeOptions.ticksWidthMinor = 5;
|
|
387
|
-
|
|
388
|
-
this.gaugeOptions.highlightsWidth = 15;
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
// horizontal No ticks
|
|
392
|
-
this.gaugeOptions.barWidth = 60;
|
|
393
|
-
|
|
394
|
-
this.gaugeOptions.needleStart = 0;
|
|
395
|
-
this.gaugeOptions.needleEnd = 100;
|
|
396
|
-
|
|
397
|
-
this.gaugeOptions.ticksWidth = 0;
|
|
398
|
-
this.gaugeOptions.strokeTicks = false;
|
|
399
|
-
this.gaugeOptions.majorTicks = [];
|
|
400
|
-
|
|
401
|
-
this.gaugeOptions.ticksPadding = 0;
|
|
402
|
-
this.gaugeOptions.minorTicks = 0;
|
|
403
|
-
this.gaugeOptions.ticksWidthMinor = 0;
|
|
404
|
-
this.gaugeOptions.numbersMargin = 0;
|
|
405
|
-
this.gaugeOptions.fontNumbersSize = 0;
|
|
406
|
-
|
|
407
|
-
this.gaugeOptions.highlightsWidth = 15;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
onResized(event: ResizedEvent) {
|
|
413
|
-
|
|
414
|
-
this.gaugeOptions.height = event.newHeight;
|
|
415
|
-
|
|
416
|
-
if (this.isGaugeVertical == true) {
|
|
417
|
-
this.gaugeOptions.width = (event.newHeight * 0.30);
|
|
418
|
-
}
|
|
419
|
-
else {
|
|
420
|
-
this.gaugeOptions.width = event.newWidth;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
<div class="wrapper" #wrapperDiv (resized)="onResized($event)">
|
|
2
|
-
<radial-gauge class="radialGauge" id="{{widgetUUID}}" #radialGauge
|
|
3
|
-
[attr.width]="gaugeOptions.width"
|
|
4
|
-
[attr.height]="gaugeOptions.height"
|
|
5
|
-
|
|
6
|
-
[attr.title]="config.displayName"
|
|
7
|
-
font-title="arial"
|
|
8
|
-
[attr.font-title-size]="gaugeOptions.fontTitleSize"
|
|
9
|
-
font-title-weight="bold"
|
|
10
|
-
[attr.color-title]="gaugeOptions.colorTitle"
|
|
11
|
-
|
|
12
|
-
[attr.units]="unitName"
|
|
13
|
-
[value]="dataValue"
|
|
14
|
-
[attr.min-value]="config.minValue"
|
|
15
|
-
[attr.max-value]="config.maxValue"
|
|
16
|
-
font-Units="arial"
|
|
17
|
-
font-Units-size="25"
|
|
18
|
-
font-Units-weight=""
|
|
19
|
-
[attr.color-units]="gaugeOptions.colorUnits"
|
|
20
|
-
|
|
21
|
-
[attr.borders]="gaugeOptions.borders"
|
|
22
|
-
[attr.border-outer-width]="gaugeOptions.borderOuterWidth"
|
|
23
|
-
[attr.border-middle-width]="gaugeOptions.borderMiddleWidth"
|
|
24
|
-
[attr.border-inner-width]="gaugeOptions.borderInnerWidth"
|
|
25
|
-
[attr.border-shadow-width]="gaugeOptions.borderShadowWidth"
|
|
26
|
-
color-border-outer="red"
|
|
27
|
-
color-border-outer-end="green"
|
|
28
|
-
[attr.color-border-middle]="gaugeOptions.colorBarProgress"
|
|
29
|
-
[attr.color-border-middle-end]="gaugeOptions.colorBarProgress"
|
|
30
|
-
[attr.color-border-inner]="gaugeOptions.colorPlate"
|
|
31
|
-
[attr.color-border-inner-end]="gaugeOptions.colorPlate"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
[attr.color-plate]="gaugeOptions.colorPlate"
|
|
35
|
-
[attr.color-plate-end]="gaugeOptions.colorPlate"
|
|
36
|
-
|
|
37
|
-
[attr.bar-progress]="gaugeOptions.barProgress"
|
|
38
|
-
[attr.bar-width]="gaugeOptions.barWidth"
|
|
39
|
-
bar-stroke-width="0"
|
|
40
|
-
bar-shadow="0"
|
|
41
|
-
[attr.color-bar]="gaugeOptions.colorBar"
|
|
42
|
-
[attr.color-bar-progress]="gaugeOptions.colorBarProgress"
|
|
43
|
-
color-bar-stroke=""
|
|
44
|
-
|
|
45
|
-
[attr.value-box]="gaugeOptions.valueBox"
|
|
46
|
-
[attr.value-box-stroke]="gaugeOptions.valueBoxStroke"
|
|
47
|
-
[attr.color-value-box-rect]="gaugeOptions.colorValueBoxRect"
|
|
48
|
-
[attr.color-value-box-rect-end]="gaugeOptions.colorValueBoxRectEnd"
|
|
49
|
-
[attr.value-box-width]="gaugeOptions.valueBoxWidth"
|
|
50
|
-
[attr.value-box-border-radius]="gaugeOptions.valueBoxBorderRadius"
|
|
51
|
-
[attr.color-value-box-background]="gaugeOptions.colorValueBoxBackground"
|
|
52
|
-
value-text=""
|
|
53
|
-
[attr.value-int]="gaugeOptions.valueInt"
|
|
54
|
-
[attr.value-dec]="gaugeOptions.valueDec"
|
|
55
|
-
font-value="arial"
|
|
56
|
-
[attr.font-value-size]="gaugeOptions.fontValueSize"
|
|
57
|
-
font-value-weight="bold"
|
|
58
|
-
[attr.color-value-text]="gaugeOptions.colorValueText"
|
|
59
|
-
value-text-shadow="false"
|
|
60
|
-
color-value-box-shadow=""
|
|
61
|
-
|
|
62
|
-
[attr.ticks-angle]="gaugeOptions.ticksAngle"
|
|
63
|
-
[attr.start-angle]="gaugeOptions.startAngle"
|
|
64
|
-
[attr.exact-ticks]="gaugeOptions.exactTicks"
|
|
65
|
-
[attr.stroke-ticks]="gaugeOptions.strokeTicks"
|
|
66
|
-
[attr.color-stroke-ticks]="this.colorStrokeTicks"
|
|
67
|
-
[attr.major-ticks]="gaugeOptions.majorTicks"
|
|
68
|
-
[attr.major-ticks-int]="gaugeOptions.majorTicksInt"
|
|
69
|
-
[attr.major-ticks-dec]="gaugeOptions.majorTicksDec"
|
|
70
|
-
[attr.color-major-ticks]="gaugeOptions.colorMajorTicks"
|
|
71
|
-
[attr.minor-ticks]="gaugeOptions.minorTicks"
|
|
72
|
-
[attr.color-minor-ticks]="gaugeOptions.colorMinorTicks"
|
|
73
|
-
[attr.numbers-margin]="gaugeOptions.numbersMargin"
|
|
74
|
-
font-numbers="arial"
|
|
75
|
-
[attr.font-numbers-size]="gaugeOptions.fontNumbersSize"
|
|
76
|
-
font-numbers-weight="bold"
|
|
77
|
-
[attr.color-numbers]="gaugeOptions.colorNumbers"
|
|
78
|
-
[attr.highlights]="gaugeOptions.highlights|json"
|
|
79
|
-
[attr.highlights-width]="gaugeOptions.highlightsWidth"
|
|
80
|
-
|
|
81
|
-
animation="true"
|
|
82
|
-
animation-duration="500"
|
|
83
|
-
animation-rule="linear"
|
|
84
|
-
animated-value="false"
|
|
85
|
-
animate-on-init="false"
|
|
86
|
-
[attr.animation-target]="gaugeOptions.animationTarget"
|
|
87
|
-
[attr.use-min-path]="gaugeOptions.useMinPath"
|
|
88
|
-
|
|
89
|
-
[attr.needle]="gaugeOptions.needle"
|
|
90
|
-
[attr.needle-end]="gaugeOptions.needleEnd"
|
|
91
|
-
[attr.needle-start]="gaugeOptions.needleStart"
|
|
92
|
-
[attr.needle-shadow]="gaugeOptions.needleShadow"
|
|
93
|
-
[attr.needle-width]="gaugeOptions.needleWidth"
|
|
94
|
-
[attr.needle-type]="gaugeOptions.needleType"
|
|
95
|
-
[attr.needle-circle-size]="gaugeOptions.needleCircleSize"
|
|
96
|
-
[attr.needle-circle-inner]="gaugeOptions.needleCircleInner"
|
|
97
|
-
[attr.needle-circle-outer]="gaugeOptions.needleCircleOuter"
|
|
98
|
-
[attr.color-needle]="gaugeOptions.colorNeedle"
|
|
99
|
-
[attr.color-needle-end]="gaugeOptions.colorNeedleEnd"
|
|
100
|
-
[attr.color-needle-shadow-up]="gaugeOptions.colorNeedleShadowUp"
|
|
101
|
-
[attr.color-needle-shadow-down]="gaugeOptions.colorNeedleShadowDown"
|
|
102
|
-
[attr.color-needle-circle-inner]="gaugeOptions.colorNeedleCircleInner"
|
|
103
|
-
[attr.color-needle-circle-inner-end]="gaugeOptions.colorNeedleCircleInnerEnd"
|
|
104
|
-
[attr.color-needle-circle-outer]="gaugeOptions.colorNeedleCircleOuter"
|
|
105
|
-
[attr.color-needle-circle-outer-end]="gaugeOptions.colorNeedleCircleOuterEnd"
|
|
106
|
-
></radial-gauge>
|
|
107
|
-
|
|
108
|
-
<div #primary class='primary' style="display: none;"></div>
|
|
109
|
-
<div #accent class='accent' style="display: none;"></div>
|
|
110
|
-
<div #warn class='warn' style="display: none;"></div>
|
|
111
|
-
<div #primaryDark class='primaryDark' style="display: none;"></div>
|
|
112
|
-
<div #accentDark class='accentDark' style="display: none;"></div>
|
|
113
|
-
<div #warnDark class='warnDark' style="display: none;"></div>
|
|
114
|
-
<div #background class='background' style="display: none;"></div>
|
|
115
|
-
<div #text class='text' style="display: none;"></div>
|
|
116
|
-
|
|
117
|
-
<div class="settingsButton" *ngIf="unlockStatus">
|
|
118
|
-
<button color="accent" mat-mini-fab class="selector-fab" (click)="openWidgetSettings()">
|
|
119
|
-
<span class="fa fa-cog"></span>
|
|
120
|
-
</button>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
@import '~@angular/material/theming';
|
|
2
|
-
|
|
3
|
-
@mixin widget-ngGauge-radial-theme($theme) {
|
|
4
|
-
|
|
5
|
-
$ngGauge: map-get($theme, ngGauge);
|
|
6
|
-
$themeForeground: map-get($theme, foreground);
|
|
7
|
-
|
|
8
|
-
app-widget-gauge-ng-radial {
|
|
9
|
-
.primary {
|
|
10
|
-
color: mat-color($ngGauge, primary-gaugeFaceLight);
|
|
11
|
-
}
|
|
12
|
-
.accent {
|
|
13
|
-
color: mat-color($ngGauge, accent-gaugeFaceLight);
|
|
14
|
-
}
|
|
15
|
-
.warn {
|
|
16
|
-
color: mat-color($ngGauge, warn-gaugeFaceLight);
|
|
17
|
-
}
|
|
18
|
-
.primaryDark {
|
|
19
|
-
color: mat-color($ngGauge, primary-gaugeFaceDark);
|
|
20
|
-
}
|
|
21
|
-
.accentDark {
|
|
22
|
-
color: mat-color($ngGauge, accent-gaugeFaceDark);
|
|
23
|
-
}
|
|
24
|
-
.warnDark {
|
|
25
|
-
color: mat-color($ngGauge, warn-gaugeFaceDark);
|
|
26
|
-
}
|
|
27
|
-
.background {
|
|
28
|
-
color: mat-color($themeForeground, divider);
|
|
29
|
-
}
|
|
30
|
-
.text {
|
|
31
|
-
color: mat-color($themeForeground, text);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
radial-gauge.radialGauge {
|
|
37
|
-
position: relative;
|
|
38
|
-
width: 94% !important;
|
|
39
|
-
height: auto !important;
|
|
40
|
-
top: 6%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.wrapper {
|
|
44
|
-
position: relative;
|
|
45
|
-
width: 100%;
|
|
46
|
-
height: 100%;
|
|
47
|
-
text-align: center;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.settingsButton {
|
|
52
|
-
position: absolute;
|
|
53
|
-
bottom: 5%;
|
|
54
|
-
left: 50%;
|
|
55
|
-
transform: translate(-50%);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
.tab-group {
|
|
60
|
-
border: 1px solid #e8e8e8;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.tab-content {
|
|
64
|
-
padding: 16px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.full-width {
|
|
68
|
-
width: 100%;
|
|
69
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { WidgetGaugeNgRadialComponent } from './widget-gauge-ng-radial.component';
|
|
4
|
-
|
|
5
|
-
describe('WidgetGaugeNgRadialComponent', () => {
|
|
6
|
-
let component: WidgetGaugeNgRadialComponent;
|
|
7
|
-
let fixture: ComponentFixture<WidgetGaugeNgRadialComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(waitForAsync(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [ WidgetGaugeNgRadialComponent ]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
fixture = TestBed.createComponent(WidgetGaugeNgRadialComponent);
|
|
18
|
-
component = fixture.componentInstance;
|
|
19
|
-
fixture.detectChanges();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|