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