igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
184 lines (183 loc) • 6.94 kB
JavaScript
import { EventEmitter } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { IgxPropertyUpdatedEventArgs } from "igniteui-angular-core";
import { IgxSeriesLayerPropertyOverlayValueResolvingEventArgs } from "./igx-series-layer-property-overlay-value-resolving-event-args";
import { SeriesLayerPropertyOverlay as SeriesLayerPropertyOverlay_internal } from "./SeriesLayerPropertyOverlay";
import { ensureBool } from "igniteui-angular-core";
/**
* Represents an axis annotation
*/
var IgxSeriesLayerPropertyOverlay = /** @class */ /*@__PURE__*/ (function () {
function IgxSeriesLayerPropertyOverlay() {
this._propertyUpdated = null;
this._valueResolving = null;
this._zoneRunner = null;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgxSeriesLayerPropertyOverlay.prototype.createImplementation = function () {
return new SeriesLayerPropertyOverlay_internal();
};
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgxSeriesLayerPropertyOverlay.prototype.onImplementationCreated = function () {
};
IgxSeriesLayerPropertyOverlay.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
};
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "isSourceOverlay", {
/**
* Gets or sets whether this property overlay targets the source series instead of the current layer while the layer is present.
*/
get: function () {
return this.i.r;
},
set: function (v) {
this.i.r = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "isAlwaysApplied", {
/**
* Gets or sets whether this property overlay should be applied to the source or target even if the source property wasn't mutated.
*/
get: function () {
return this.i.p;
},
set: function (v) {
this.i.p = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "internalPropertyName", {
get: function () {
return this.i.aa;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "propertyName", {
/**
* Gets or sets the property to overlay on the series or series layer.
*/
get: function () {
return this.i.ad;
},
set: function (v) {
this.i.ad = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "currentValuePropertyName", {
/**
* Gets or sets the property from which to get the current value, if different from property name.
*/
get: function () {
return this.i.y;
},
set: function (v) {
this.i.y = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "value", {
/**
* Gets or sets the value to overlay on the series or series layer.
*/
get: function () {
return this.i.x;
},
set: function (v) {
this.i.x = v;
},
enumerable: false,
configurable: true
});
IgxSeriesLayerPropertyOverlay.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "propertyUpdated", {
/**
* Event raised when a property value is changed.
*/
get: function () {
var _this = this;
if (this._propertyUpdated == null) {
this._propertyUpdated = new EventEmitter();
this.i.propertyUpdated = delegateCombine(this.i.propertyUpdated, function (o, e) {
_this._runInZone(function () {
var outerArgs = new IgxPropertyUpdatedEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforePropertyUpdated) {
_this.beforePropertyUpdated(_this, outerArgs);
}
_this._propertyUpdated.emit({
sender: _this,
args: outerArgs
});
});
});
}
return this._propertyUpdated;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxSeriesLayerPropertyOverlay.prototype, "valueResolving", {
get: function () {
var _this = this;
if (this._valueResolving == null) {
this._valueResolving = new EventEmitter();
this.i.valueResolving = delegateCombine(this.i.valueResolving, function (o, e) {
_this._runInZone(function () {
var outerArgs = new IgxSeriesLayerPropertyOverlayValueResolvingEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeValueResolving) {
_this.beforeValueResolving(_this, outerArgs);
}
_this._valueResolving.emit({
sender: _this,
args: outerArgs
});
});
});
}
return this._valueResolving;
},
enumerable: false,
configurable: true
});
IgxSeriesLayerPropertyOverlay.prototype._runInZone = function (act) {
if (this._zoneRunner != null) {
this._zoneRunner(act);
}
else {
act();
}
};
return IgxSeriesLayerPropertyOverlay;
}());
export { IgxSeriesLayerPropertyOverlay };