igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
105 lines (104 loc) • 3.65 kB
JavaScript
/*
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 { __extends } from "tslib";
import { NativeUIElementBridge } from "./NativeUIElementBridge";
import { runOn, markType } from "./type";
import { NativeUISliderValueChangedEventArgs } from "./NativeUISliderValueChangedEventArgs";
/**
* @hidden
*/
var IgcSliderBridge = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcSliderBridge, _super);
function IgcSliderBridge() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.e = null;
_this.c = null;
_this.g = null;
_this.f = null;
_this.d = null;
_this.h = null;
return _this;
}
IgcSliderBridge.prototype.addHandler = function (a, b, c, d) {
switch (c) {
case 0:
{
var e = a;
this.f = e.listen("igcInput", runOn(this, this.j));
this.d = d;
this.h = b;
}
break;
case 4:
{
var f = a;
this.e = f.listen("igcChange", runOn(this, this.i));
this.c = d;
this.g = b;
}
break;
}
};
IgcSliderBridge.prototype.j = function (a) {
if (this.d != null) {
var b = new NativeUISliderValueChangedEventArgs();
this.d(this.h, b);
}
};
IgcSliderBridge.prototype.i = function (a) {
if (this.c != null) {
var b = new NativeUISliderValueChangedEventArgs();
this.c(this.g, b);
}
};
IgcSliderBridge.prototype.getValue = function (a, b) {
switch (b) {
case 10: return a.getProperty("min");
case 11: return a.getProperty("max");
case 12: return a.getProperty("step");
case 2: return a.getProperty("value");
}
return null;
};
IgcSliderBridge.prototype.removeHandler = function (a, b, c, d) {
switch (c) {
case 0:
if (this.f != null) {
this.f();
}
this.d = null;
this.h = null;
break;
case 4:
if (this.e != null) {
this.e();
}
this.c = null;
this.g = null;
break;
}
};
IgcSliderBridge.prototype.setValue = function (a, b, c) {
switch (b) {
case 10:
a.setProperty("min", c);
break;
case 11:
a.setProperty("max", c);
break;
case 12:
a.setProperty("step", c);
break;
case 2:
a.setProperty("value", c);
break;
}
};
IgcSliderBridge.$t = markType(IgcSliderBridge, 'IgcSliderBridge', NativeUIElementBridge.$);
return IgcSliderBridge;
}(NativeUIElementBridge));
export { IgcSliderBridge };