igniteui-angular-inputs
Version:
Ignite UI Angular input components for building rich data visualizations for modern web apps.
135 lines (134 loc) • 4.88 kB
JavaScript
import { EventEmitter } from '@angular/core';
import { delegateCombine } from "igniteui-angular-core";
import { MultiSliderThumbRangePosition_$type } from "./MultiSliderThumbRangePosition";
import { IgxMultiSliderTrackThumbRange } from "./igx-multi-slider-track-thumb-range";
import { IgxPropertyUpdatedEventArgs } from "igniteui-angular-core";
import { MultiSliderThumb as MultiSliderThumb_internal } from "./MultiSliderThumb";
import { ensureEnum } from "igniteui-angular-core";
var IgxMultiSliderThumb = /** @class */ /*@__PURE__*/ (function () {
function IgxMultiSliderThumb() {
this._propertyUpdated = null;
this._zoneRunner = null;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgxMultiSliderThumb.prototype.createImplementation = function () {
return new MultiSliderThumb_internal();
};
Object.defineProperty(IgxMultiSliderThumb.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgxMultiSliderThumb.prototype.onImplementationCreated = function () {
};
IgxMultiSliderThumb.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
};
Object.defineProperty(IgxMultiSliderThumb.prototype, "value", {
get: function () {
return this.i.s;
},
set: function (v) {
this.i.s = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxMultiSliderThumb.prototype, "rangePosition", {
get: function () {
return this.i.g;
},
set: function (v) {
this.i.g = ensureEnum(MultiSliderThumbRangePosition_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxMultiSliderThumb.prototype, "range", {
get: function () {
var r = this.i.i;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = new IgxMultiSliderTrackThumbRange();
if (r.$type) {
e._implementation = r;
}
else {
if (e.i.setNativeElement) {
e.i.setNativeElement(r);
}
}
r.externalObject = e;
}
return r.externalObject;
},
set: function (v) {
v == null ? this.i.i = null : this.i.i = v.i;
},
enumerable: false,
configurable: true
});
IgxMultiSliderThumb.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.range && this.range.name && this.range.name == name) {
return this.range;
}
return null;
};
IgxMultiSliderThumb.prototype.push = function (amount) {
var iv = this.i.r(amount);
return (iv);
};
Object.defineProperty(IgxMultiSliderThumb.prototype, "propertyUpdated", {
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
});
IgxMultiSliderThumb.prototype._runInZone = function (act) {
if (this._zoneRunner != null) {
this._zoneRunner(act);
}
else {
act();
}
};
return IgxMultiSliderThumb;
}());
export { IgxMultiSliderThumb };