UNPKG

igniteui-angular-gauges

Version:

Ignite UI Angular gauge components.

304 lines (303 loc) 11.9 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 } from "igniteui-angular-core"; import { XamLinearGraphRange } from "./XamLinearGraphRange"; import * as i0 from "@angular/core"; var IgxLinearGraphRangeComponent = /** @class */ /*@__PURE__*/ (function () { function IgxLinearGraphRangeComponent() { this._renderer = null; this.__p = null; this._hasUserValues = new Set(); this._stylingContainer = null; this._stylingParent = null; this._inStyling = false; this._zoneRunner = null; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); } Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgxLinearGraphRangeComponent.prototype.onImplementationCreated = function () { }; Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "rangeInternal", { get: function () { return this.i; }, enumerable: false, configurable: true }); IgxLinearGraphRangeComponent.prototype.createImplementation = function () { return new XamLinearGraphRange(); }; IgxLinearGraphRangeComponent.prototype.ngOnInit = function () { }; IgxLinearGraphRangeComponent.prototype._provideRenderer = function (renderer) { this._renderer = renderer; this._zoneRunner = function (act) { return renderer._ngZone.run(act); }; }; IgxLinearGraphRangeComponent._createFromInternal = function (internal) { if (!internal) { return null; } if (!internal.$type) { return null; } var name = internal.$type.name; var externalName = "Igx" + name + "Component"; if (!TypeRegistrar.isRegistered(externalName)) { return null; } return TypeRegistrar.create(externalName); }; Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "name", { /** * Gets or sets the name of the range. */ get: function () { return this.i.u; }, set: function (v) { this.i.u = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "brush", { /** * Gets or sets the brush to use to fill the range. */ get: function () { return brushToString(this.i.an); }, set: function (v) { this.i.an = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "outline", { /** * Gets or sets the outline to use when rendering the range. */ get: function () { return brushToString(this.i.ao); }, set: function (v) { this.i.ao = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "startValue", { /** * Gets or sets the value at which the range starts along the scale. */ get: function () { return this.i.o; }, set: function (v) { this.i.o = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "endValue", { /** * Gets or sets the value at which the range ends along the scale. */ get: function () { return this.i.j; }, set: function (v) { this.i.j = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "innerStartExtent", { /** * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to start rendering the inner edge of the range. * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. */ get: function () { return this.i.l; }, set: function (v) { this.i.l = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "innerEndExtent", { /** * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to end rendering the inner edge of the range. * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. */ get: function () { return this.i.k; }, set: function (v) { this.i.k = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "outerStartExtent", { /** * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to start rendering the outer edge of the range. * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. */ get: function () { return this.i.n; }, set: function (v) { this.i.n = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "outerEndExtent", { /** * Gets or sets the distance measured from the front/bottom of the bullet graph (from 0 to 1) at which to end rendering the outer edge of the range. * Values further from zero than 1 can be used to make this extend further than the normal width/height of the bullet graph. */ get: function () { return this.i.m; }, set: function (v) { this.i.m = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "strokeThickness", { /** * Gets or sets the stroke thickness to use when rendering this range's outline. */ get: function () { return this.i.p; }, set: function (v) { this.i.p = +v; }, enumerable: false, configurable: true }); IgxLinearGraphRangeComponent.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; Object.defineProperty(IgxLinearGraphRangeComponent.prototype, "hasUserValues", { get: function () { return this._hasUserValues; }, enumerable: false, configurable: true }); IgxLinearGraphRangeComponent.prototype.__m = function (propertyName) { if (!this._inStyling) { this._hasUserValues.add(propertyName); } }; IgxLinearGraphRangeComponent.prototype._styling = function (container, component, parent) { if (this._inStyling) { return; } this._inStyling = true; this._stylingContainer = container; this._stylingParent = component; var genericPrefix = ""; var typeName = this.i.$type.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } genericPrefix = toSpinal("LinearGraphRangeComponent"); var additionalPrefixes = []; var prefix = toSpinal(typeName); additionalPrefixes.push(prefix + "-"); var 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); } var basePrefix = toSpinal(typeName); additionalPrefixes.push(basePrefix + "-"); b = b.baseType; } if (parent) { var parentTypeName = parent.i.$type.name; if (parentTypeName.indexOf("Xam") === 0) { parentTypeName = parentTypeName.substring(3); } var 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; }; IgxLinearGraphRangeComponent.prototype._runInZone = function (act) { if (this._zoneRunner != null) { this._zoneRunner(act); } else { act(); } }; IgxLinearGraphRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxLinearGraphRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxLinearGraphRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxLinearGraphRangeComponent, selector: "igx-linear-graph-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 IgxLinearGraphRangeComponent; }()); export { IgxLinearGraphRangeComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxLinearGraphRangeComponent, decorators: [{ type: Component, args: [{ selector: 'igx-linear-graph-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 }] } });