@biacsics/ng-canvas-gauges
Version:
Angular 15+ component wrapper for the canvas-gauges lib written by @Mikhus
1 lines • 22.4 kB
Source Map (JSON)
{"version":3,"file":"biacsics-ng-canvas-gauges.mjs","sources":["../../../projects/ng-canvas-gauges/src/lib/base-gauge.ts","../../../projects/ng-canvas-gauges/src/lib/linear-gauge.ts","../../../projects/ng-canvas-gauges/src/lib/radial-gauge.ts","../../../projects/ng-canvas-gauges/src/lib/gauges.module.ts","../../../projects/ng-canvas-gauges/src/public_api.ts","../../../projects/ng-canvas-gauges/src/biacsics-ng-canvas-gauges.ts"],"sourcesContent":["/*!\r\n * The MIT License (MIT)\r\n *\r\n * Copyright (c) 2017 Vlad Martynenko <vladimir.martynenko.work@gmail.com>\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\nimport { ViewChild, Input, NgZone, ElementRef, OnInit, AfterViewInit, Directive } from '@angular/core';\r\nimport * as CanvasGauges from 'canvas-gauges';\r\nimport * as Rx from 'rx-dom-html';\r\n\r\n\r\n\r\n// String utils\r\nconst toCamelCase = (str: string) => str.replace(/(\\-\\w)/g, (matches) => matches[1].toUpperCase());\r\n\r\nconst toKebabCase = (str: string) => str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\r\n\r\nconst attributeName2PropertyName = (attrName: string) => toCamelCase(attrName);\r\n\r\n\r\n\r\n\r\n/**\r\n * Base gauge component for the Gauges rendering\r\n * T - Type of the Gauge to be rendered (Currently RadialGauge, LinearGauge from the original library)\r\n * T2 - Type of config options used by the particular gauge (RadialGaugeOptions, LinearGaugeOptions)\r\n */\r\n@Directive()\r\nexport abstract class BaseGauge<T extends CanvasGauges.BaseGauge, T2 extends CanvasGauges.GenericOptions>\r\n implements OnInit, AfterViewInit {\r\n\r\n /**\r\n * Canvas element on the template used by the library to draw gauge element\r\n */\r\n @ViewChild('gauge', { static: true })\r\n protected canvas: ElementRef;\r\n\r\n /**\r\n * A gauge instance responsible for rendering and updates on the canvas.\r\n * Subclasses should initialize in their ngOnInit implementation.\r\n */\r\n protected gauge: T;\r\n\r\n\r\n /**\r\n * Flag indicating that OnViewInit life-cycle has completed\r\n */\r\n private isInited = false;\r\n\r\n /**\r\n * value property of gauge prior to component view initialization\r\n */\r\n private preInitValue: number;\r\n\r\n /**\r\n * options property of gauge prior to component view initialization\r\n */\r\n private preInitOptions: T2;\r\n\r\n\r\n /**\r\n * Listen for attribute changes, i.e., options properties that are stored\r\n * as attributes on this ElementRef\r\n */\r\n private domListener: MutationObserver;\r\n\r\n\r\n /**\r\n *\r\n * @param el - reference to the element of the whole component, used to scrape options declared on the component itself\r\n * @param zone - required to redraw gauge outside of Angular, due to animation lags caused by the ovewritten function of the ngZone\r\n */\r\n constructor(private el: ElementRef, public zone: NgZone) {\r\n }\r\n\r\n\r\n /**\r\n * Subclasses should instantiate the CanvasGauge object in the child component\r\n */\r\n abstract ngOnInit(): void;\r\n\r\n\r\n /**\r\n * Returns gauges properties as an options object.\r\n * Option properties consist of the attribute-based properties and those\r\n * explicitly set.\r\n * @returns <T2>\r\n */\r\n public get options(): T2 {\r\n\r\n const options = {} as T2;\r\n options.renderTo = this.canvas.nativeElement;\r\n\r\n // Map attribute-based options onto options.\r\n // Requries converting kebab style attribute names to camelCase property names\r\n for (const attr of this.el.nativeElement.attributes) {\r\n const prop = attributeName2PropertyName(attr.name);\r\n options[prop] = CanvasGauges.DomObserver.parse(attr.value);\r\n }\r\n\r\n // merge preOptons with attribute-based properties\r\n // tslint:disable-next-line:forin\r\n for (const prop in this.preInitOptions) {\r\n options[prop] = this.preInitOptions[prop];\r\n }\r\n\r\n // clear the preInitOptions as they have already been merged\r\n // with the attribute-based properties\r\n if (this.isInited) {\r\n this.preInitOptions = null;\r\n }\r\n\r\n return options;\r\n }\r\n\r\n\r\n /**\r\n * Assign gauge options at anytime in the lifecycle.\r\n * @param newOptions - assign the style and size properties\r\n */\r\n @Input()\r\n public set options(newOptions: T2) {\r\n\r\n // cache newOptions as preInitOptions until gauge is ready\r\n if (!this.isInited) {\r\n this.preInitOptions = newOptions;\r\n return;\r\n }\r\n\r\n this.update(newOptions);\r\n }\r\n\r\n\r\n /**\r\n * Assign the value of the gauge visual indicator such as a needle or pointer\r\n * @param newValue the guage new value\r\n */\r\n @Input()\r\n public set value(newValue: number) {\r\n\r\n // case new gauge value as preInitValue until the gauge is ready\r\n if (!this.isInited) {\r\n this.preInitValue = newValue;\r\n return;\r\n }\r\n\r\n this.zone.runOutsideAngular(() => {\r\n this.gauge.value = newValue;\r\n });\r\n }\r\n\r\n\r\n /**\r\n * Update the gauge options. Do not use until after OnViewInit() before using.\r\n *\r\n * Special implementation note - options.properties are maintained as\r\n * attribute name->value on this component's elementRef. Thus this method\r\n * maps each newOptions property onto the property's corresponding attribute.\r\n * The attribute update triggers a DOM mutation event which \"this\" listens for.\r\n * See #listenForDOMEvents()\r\n *\r\n * @param newOptions - the options to update the gauge\r\n */\r\n public update(newOptions: T2 | {}) {\r\n\r\n // map all options onto this element's attributes\r\n // Then attribute changes will be detected and pushed to the gauge.update()\r\n if (!newOptions) { return; }\r\n\r\n // tslint:disable-next-line:forin\r\n for (const prop in newOptions) {\r\n const val = newOptions[prop].toString();\r\n\r\n if (prop === 'value') {\r\n // short circuit the value property update by calling\r\n // the gauge.value api directly for efficient animated update\r\n this.value = CanvasGauges.DomObserver.parse(val);\r\n } else {\r\n const attrName = toKebabCase(prop);\r\n this.el.nativeElement.setAttribute(attrName, val);\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Perform gauge initialization.\r\n * Subclasses that override this method must this super version\r\n * for proper operation.\r\n */\r\n public ngAfterViewInit() {\r\n\r\n // initial update of gauge properties\r\n this.initGauge();\r\n\r\n this.listenForDOMEvents();\r\n\r\n this.isInited = true;\r\n }\r\n\r\n\r\n /**\r\n * Listen for attribute-change events that are created when updating\r\n * the options of this gauge.\r\n */\r\n protected listenForDOMEvents() {\r\n // Listen to gauge element for attribute changes\r\n // Convert all changed attribtues into a GenericOptions or subclass\r\n // Update the gauge with the new options.\r\n this.domListener =\r\n Rx.DOM.fromMutationObserver(this.el.nativeElement, { attributes: true }).\r\n subscribe(changes => {\r\n const newOptions = {} as T2;\r\n changes.forEach(change => {\r\n if ('attributes' === change.type) {\r\n // console.log('DOM, change', change.attributeName);\r\n newOptions[attributeName2PropertyName(change.attributeName)] =\r\n CanvasGauges.DomObserver.parse(\r\n this.el.nativeElement.getAttribute(change.attributeName));\r\n }\r\n });\r\n\r\n this.basicUpdate(newOptions);\r\n });\r\n }\r\n\r\n\r\n /**\r\n * Discontinue listening for attribute change events.\r\n */\r\n protected stopListeningForDOMEvents() {\r\n if (this.domListener) {\r\n this.domListener.disconnect();\r\n this.domListener = null;\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Initalize the gauge with all options defined by attributes and\r\n * parent component options.\r\n */\r\n protected initGauge() {\r\n const options = this.options;\r\n if (this.preInitValue) {\r\n options.value = this.preInitValue;\r\n }\r\n\r\n // init options.renderTo if needed\r\n if (!options.hasOwnProperty('renderTo') || !options.renderTo) {\r\n options.renderTo = this.canvas.nativeElement;\r\n }\r\n\r\n this.basicUpdate(options);\r\n }\r\n\r\n\r\n /**\r\n * Performs the gauge update using the current options\r\n * @param options The options for the guage\r\n */\r\n protected basicUpdate(options: T2) {\r\n\r\n // treat the value property special and update it through the\r\n // value getter.\r\n if (typeof options.value === 'number') {\r\n\r\n // use gauge api directly for most efficient update method\r\n this.value = options.value;\r\n\r\n // filter value property from options to avoid redundant\r\n // processing by gauge\r\n delete options.value;\r\n }\r\n\r\n // do nothing if no option properties to update\r\n if (Object.keys(options).length) {\r\n this.gauge.update(options);\r\n }\r\n }\r\n\r\n}\r\n\r\n\r\n\r\n","/*!\r\n * The MIT License (MIT)\r\n *\r\n * Copyright (c) 2017 Vlad Martynenko <vladimir.martynenko.work@gmail.com>\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\nimport {Component, NgZone, ElementRef, OnInit} from '@angular/core';\r\nimport {BaseGauge} from './base-gauge';\r\nimport * as CanvasGauges from 'canvas-gauges';\r\n\r\nexport { LinearGaugeOptions } from 'canvas-gauges';\r\n\r\n/**\r\n * Implements Linear Gauge from the original library\r\n */\r\n@Component({\r\n // tslint:disable-next-line:component-selector\r\n selector: 'linear-gauge',\r\n template: '<canvas #gauge></canvas>'\r\n})\r\n// tslint:disable-next-line:component-class-suffix\r\nexport class LinearGauge extends BaseGauge<CanvasGauges.LinearGauge, CanvasGauges.LinearGaugeOptions> implements OnInit {\r\n\r\n constructor(el: ElementRef, zone: NgZone) {\r\n super(el, zone);\r\n }\r\n\r\n\r\n ngOnInit(): void {\r\n this.gauge = new CanvasGauges.LinearGauge(this.options).draw();\r\n }\r\n}\r\n","/*!\r\n * The MIT License (MIT)\r\n *\r\n * Copyright (c) 2017 Vlad Martynenko <vladimir.martynenko.work@gmail.com>\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n */\r\n\r\nimport { Component, NgZone, ElementRef, OnInit } from '@angular/core';\r\nimport { BaseGauge } from './base-gauge';\r\nimport * as CanvasGauges from 'canvas-gauges';\r\n\r\nexport { RadialGaugeOptions } from 'canvas-gauges';\r\n\r\n/**\r\n * Implements Radial Gauge from the original library\r\n */\r\n@Component({\r\n // tslint:disable-next-line:component-selector\r\n selector: 'radial-gauge',\r\n template: '<canvas #gauge></canvas>'\r\n})\r\n// tslint:disable-next-line:component-class-suffix\r\nexport class RadialGauge extends BaseGauge<CanvasGauges.RadialGauge, CanvasGauges.RadialGaugeOptions> implements OnInit {\r\n constructor(el: ElementRef, zone: NgZone) {\r\n super(el, zone);\r\n }\r\n\r\n ngOnInit() {\r\n this.gauge = new CanvasGauges.RadialGauge(this.options).draw();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { LinearGauge } from './linear-gauge';\r\nimport { RadialGauge } from './radial-gauge';\r\n\r\n@NgModule({\r\n declarations: [\r\n LinearGauge,\r\n RadialGauge],\r\n imports: [\r\n ],\r\n exports: [\r\n LinearGauge,\r\n RadialGauge]\r\n})\r\nexport class GaugesModule { }\r\n","/*\r\n * Public API Surface of ng-canvas-gauges\r\n */\r\nexport * from './lib/gauges.module';\r\n\r\n// components\r\nexport * from './lib/linear-gauge';\r\nexport * from './lib/radial-gauge';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBG;;AAQH;AACA,MAAM,WAAW,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAEnG,MAAM,WAAW,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,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