UNPKG

igniteui-angular-gauges

Version:

Ignite UI Angular gauge components.

256 lines (255 loc) 9.94 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Component, Input } from "@angular/core"; import { TypeRegistrar } from "igniteui-angular-core"; import { brushToString, stringToBrush, toSpinal, initializePropertiesFromCss, NamePatcher } from "igniteui-angular-core"; import { XamRadialGaugeRange } from "./XamRadialGaugeRange"; import * as i0 from "@angular/core"; export let IgxRadialGaugeRangeComponent = /*@__PURE__*/ (() => { class IgxRadialGaugeRangeComponent { constructor() { this._renderer = null; this.__p = null; this._hasUserValues = new Set(); this._stylingContainer = null; this._stylingParent = null; this._inStyling = false; this._zoneRunner = null; if (this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this)); } this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); } get i() { return this._implementation; } onImplementationCreated() { } get rangeInternal() { return this.i; } createImplementation() { return new XamRadialGaugeRange(); } ngOnInit() { } _provideRenderer(renderer) { this._renderer = renderer; this._zoneRunner = (act) => renderer._ngZone.run(act); } static _createFromInternal(internal) { if (!internal) { return null; } if (!internal.$type) { return null; } let name = internal.$type.name; let externalName = "Igx" + name + "Component"; if (!TypeRegistrar.isRegistered(externalName)) { return null; } return TypeRegistrar.create(externalName); } /** * Gets or sets the name of the range. */ get name() { return this.i.v; } set name(v) { this.i.v = v; } /** * Gets or sets the brush to use to fill the range. */ get brush() { return brushToString(this.i.ao); } set brush(v) { this.i.ao = stringToBrush(v); } /** * Gets or sets the outline to use when rendering the range. */ get outline() { return brushToString(this.i.ap); } set outline(v) { this.i.ap = stringToBrush(v); } /** * Gets or sets the value at which the range starts along the scale. */ get startValue() { return this.i.o; } set startValue(v) { this.i.o = +v; } /** * Gets or sets the value at which the range ends along the scale. */ get endValue() { return this.i.j; } set endValue(v) { this.i.j = +v; } /** * Gets or sets the distance from the center of the gauge (from 0 to 1) at which to start rendering the inner sweep of the range. * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. */ get innerStartExtent() { return this.i.l; } set innerStartExtent(v) { this.i.l = +v; } /** * Gets or sets the distance from the center of the gauge (from 0 to 1) at which to end rendering the inner sweep of the range. * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. */ get innerEndExtent() { return this.i.k; } set innerEndExtent(v) { this.i.k = +v; } /** * Gets or sets the distance from the center of the gauge (from 0 to 1) at which to start rendering the outer sweep of the range. * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. */ get outerStartExtent() { return this.i.n; } set outerStartExtent(v) { this.i.n = +v; } /** * Gets or sets the distance from the center of the gauge (from 0 to 1) at which to end rendering the outer sweep of the range. * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. */ get outerEndExtent() { return this.i.m; } set outerEndExtent(v) { this.i.m = +v; } /** * Gets or sets the stroke thickness to use when rendering this range's outline. */ get strokeThickness() { return this.i.p; } set strokeThickness(v) { this.i.p = +v; } findByName(name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; } get hasUserValues() { return this._hasUserValues; } __m(propertyName) { if (!this._inStyling) { this._hasUserValues.add(propertyName); } } _styling(container, component, parent) { if (this._inStyling) { return; } this._inStyling = true; this._stylingContainer = container; this._stylingParent = component; let genericPrefix = ""; let typeName = this.i.$type.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } genericPrefix = toSpinal("RadialGaugeRangeComponent"); let additionalPrefixes = []; let prefix = toSpinal(typeName); additionalPrefixes.push(prefix + "-"); let b = this.i.$type.baseType; while (b && b.name != "Object" && b.name != "Base" && b.name != "Control" && b.Name != "DependencyObject" && b.Name != "FrameworkElement") { typeName = b.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } let basePrefix = toSpinal(typeName); additionalPrefixes.push(basePrefix + "-"); b = b.baseType; } if (parent) { let parentTypeName = parent.i.$type.name; if (parentTypeName.indexOf("Xam") === 0) { parentTypeName = parentTypeName.substring(3); } let parentPrefix = toSpinal(parentTypeName); additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-"); additionalPrefixes.push(parentPrefix + "-" + prefix + "-"); } initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes); if (this._otherStyling) { this._otherStyling(container, component, parent); } this._inStyling = false; } _runInZone(act) { if (this._zoneRunner != null) { this._zoneRunner(act); } else { act(); } } } IgxRadialGaugeRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxRadialGaugeRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxRadialGaugeRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxRadialGaugeRangeComponent, selector: "igx-radial-gauge-range", inputs: { name: "name", brush: "brush", outline: "outline", startValue: "startValue", endValue: "endValue", innerStartExtent: "innerStartExtent", innerEndExtent: "innerEndExtent", outerStartExtent: "outerStartExtent", outerEndExtent: "outerEndExtent", strokeThickness: "strokeThickness" }, providers: [], ngImport: i0, template: ``, isInline: true }); return IgxRadialGaugeRangeComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxRadialGaugeRangeComponent, decorators: [{ type: Component, args: [{ selector: 'igx-radial-gauge-range', template: ``, providers: [] }] }], ctorParameters: function () { return []; }, propDecorators: { name: [{ type: Input }], brush: [{ type: Input }], outline: [{ type: Input }], startValue: [{ type: Input }], endValue: [{ type: Input }], innerStartExtent: [{ type: Input }], innerEndExtent: [{ type: Input }], outerStartExtent: [{ type: Input }], outerEndExtent: [{ type: Input }], strokeThickness: [{ type: Input }] } });