igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
67 lines (66 loc) • 2.35 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 { NativeUIElementBridge } from "./NativeUIElementBridge";
import { runOn, markType } from "./type";
import { NativeUICheckboxChangeEventArgs } from "./NativeUICheckboxChangeEventArgs";
/**
* @hidden
*/
export let IgcCheckboxBridge = /*@__PURE__*/ (() => {
class IgcCheckboxBridge extends NativeUIElementBridge {
constructor() {
super(...arguments);
this.d = null;
this.c = null;
this.e = null;
}
addHandler(a, b, c, d) {
switch (c) {
case 2:
let e = a;
this.d = e.listen("igcChange", runOn(this, this.f));
this.c = d;
this.e = b;
break;
}
}
f(a) {
if (this.c != null) {
let b = new NativeUICheckboxChangeEventArgs();
this.c(this.e, b);
}
}
getValue(a, b) {
switch (b) {
case 4: return true;
case 5: return a.getProperty("checked");
}
return null;
}
removeHandler(a, b, c, d) {
switch (c) {
case 2:
if (this.d != null) {
this.d();
}
this.c = null;
this.e = null;
break;
}
}
setValue(a, b, c) {
switch (b) {
case 4: return;
case 5:
a.setProperty("checked", c);
return;
}
}
}
IgcCheckboxBridge.$t = markType(IgcCheckboxBridge, 'IgcCheckboxBridge', NativeUIElementBridge.$);
return IgcCheckboxBridge;
})();