igniteui-react-inputs
Version:
Ignite UI React input components.
141 lines (140 loc) • 5.04 kB
JavaScript
import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { MultiSliderThumbRangePosition_$type } from "./MultiSliderThumbRangePosition";
import { IgrMultiSliderTrackThumbRange } from "./igr-multi-slider-track-thumb-range";
import { IgrPropertyUpdatedEventArgs } from "igniteui-react-core";
import { MultiSliderThumb as MultiSliderThumb_internal } from "./MultiSliderThumb";
import { ensureEnum } from "igniteui-react-core";
var IgrMultiSliderThumb = /** @class */ /*@__PURE__*/ (function () {
function IgrMultiSliderThumb() {
this.mounted = false;
this._propertyUpdated = null;
this._propertyUpdated_wrapped = null;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgrMultiSliderThumb.prototype.createImplementation = function () {
return new MultiSliderThumb_internal();
};
Object.defineProperty(IgrMultiSliderThumb.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrMultiSliderThumb.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrMultiSliderThumb.prototype.onImplementationCreated = function () {
};
IgrMultiSliderThumb.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
};
Object.defineProperty(IgrMultiSliderThumb.prototype, "value", {
get: function () {
return this.i.s;
},
set: function (v) {
this.i.s = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrMultiSliderThumb.prototype, "rangePosition", {
get: function () {
return this.i.g;
},
set: function (v) {
this.i.g = ensureEnum(MultiSliderThumbRangePosition_$type, v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrMultiSliderThumb.prototype, "range", {
get: function () {
var r = this.i.i;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = new IgrMultiSliderTrackThumbRange();
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
});
IgrMultiSliderThumb.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;
};
IgrMultiSliderThumb.prototype.push = function (amount) {
var iv = this.i.r(amount);
return (iv);
};
Object.defineProperty(IgrMultiSliderThumb.prototype, "propertyUpdated", {
get: function () {
return this._propertyUpdated;
},
set: function (ev) {
var _this = this;
if (this._propertyUpdated_wrapped !== null) {
this.i.propertyUpdated = delegateRemove(this.i.propertyUpdated, this._propertyUpdated_wrapped);
this._propertyUpdated_wrapped = null;
this._propertyUpdated = null;
}
this._propertyUpdated = ev;
this._propertyUpdated_wrapped = function (o, e) {
var outerArgs = new IgrPropertyUpdatedEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforePropertyUpdated) {
_this.beforePropertyUpdated(_this, outerArgs);
}
if (_this._propertyUpdated) {
_this._propertyUpdated(_this, outerArgs);
}
};
this.i.propertyUpdated = delegateCombine(this.i.propertyUpdated, this._propertyUpdated_wrapped);
;
},
enumerable: false,
configurable: true
});
return IgrMultiSliderThumb;
}());
export { IgrMultiSliderThumb };