UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

2,207 lines 72.1 kB
/*
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, __values } from "tslib";
import { Base, runOn, delegateCombine, typeCast, fromEnum, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, delegateRemove, EnumUtil, enumGetBox } from "igniteui-react-core";
import { DomWrapper_$type } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { XCheckbox } from "igniteui-react-inputs";
import { XLabel } from "igniteui-react-inputs";
import { XIcon } from "igniteui-react-inputs";
import { XPrefix } from "igniteui-react-inputs";
import { XInputGroup } from "igniteui-react-inputs";
import { XInput } from "igniteui-react-inputs";
import { ControlDisplayDensity_$type } from "igniteui-react-core";
import { FontInfo } from "igniteui-react-core";
import { DataContext } from "igniteui-react-core";
import { IDataLegendTarget_$type } from "igniteui-react-core";
import { BrushUtil } from "igniteui-react-core";
import { DeviceUtils } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
import { NativeUI } from "igniteui-react-core";
import { PrimaryKeyValue } from "./PrimaryKeyValue";
import { Thickness } from "igniteui-react-core";
import { CheckboxListIndexType_$type } from "./CheckboxListIndexType";
import { stringIsNullOrEmpty, stringIsNullOrWhiteSpace } from "igniteui-react-core";
import { SRProvider } from "igniteui-react-core";
import { GridSelectedKeysCollection } from "./GridSelectedKeysCollection";
import { InputGroupDisplayType_$type } from "igniteui-react-inputs";
import { GridStyleRepository } from "./GridStyleRepository";
import { BaseControlTheme_$type } from "igniteui-react-core";
import { ScrollbarStyle_$type } from "igniteui-react-core";
import { FilterFactory } from "igniteui-react-core";
import { CheckboxListKeysClearedEventArgs } from "./CheckboxListKeysClearedEventArgs";
import { CheckedChangedEventArgs } from "./CheckedChangedEventArgs";
import { TemplateColumn } from "./TemplateColumn";
import { FastReflectionHelper } from "igniteui-react-core";
import { DataSeriesPropertyType_$type } from "igniteui-react-core";
import { SvgIconRegistry } from "igniteui-react-core";
import { DataSourceSchemaPropertyType_$type } from "igniteui-react-core";
import { CheckboxListIndexTypeChangedEventArgs } from "./CheckboxListIndexTypeChangedEventArgs";
import { ColumnWidth } from "./ColumnWidth";
import { DateTimeColumn } from "./DateTimeColumn";
import { NumericColumn } from "./NumericColumn";
import { TextColumn } from "./TextColumn";
import { ArgumentException } from "igniteui-react-core";
import { Size } from "igniteui-react-core";
import { ComponentSizeHelpers } from "igniteui-react-core";
import { SelectAllCheckboxChangedEventArgs } from "./SelectAllCheckboxChangedEventArgs";
import { isPositiveInfinity } from "igniteui-react-core";
/**
 * @hidden
 */
var CheckboxListView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CheckboxListView, _super);
    function CheckboxListView() {
        var _this = _super.call(this) || this;
        _this.e = new Dictionary$2(DomWrapper_$type, XCheckbox.$, 0);
        _this.h = new Dictionary$2(DomWrapper_$type, XLabel.$, 0);
        _this.g = new Dictionary$2(DomWrapper_$type, XLabel.$, 0);
        _this.f = new Dictionary$2(DomWrapper_$type, XIcon.$, 0);
        _this.m = null;
        _this.a = null;
        _this.l = null;
        _this.k = null;
        _this.c = null;
        _this.b = null;
        _this.i = null;
        _this.d = false;
        _this.j = null;
        return _this;
    }
    CheckboxListView.prototype.q = function () {
    };
    CheckboxListView.prototype.p = function (a) {
        if (a == null) {
            this.i = null;
            this.e.clear();
            return;
        }
        this.i = a;
        this.aa();
        this.aj();
        this.am();
        this.x();
        var b = Math.round(a.rootWrapper.width());
        var c = Math.round(a.rootWrapper.height());
        this.i.rootWrapper.setStyleProperty("position", "relative");
        this.i.rootWrapper.setStyleProperty("padding-bottom", "4px");
        this.al();
    };
    CheckboxListView.prototype.aa = function () {
        if (this.i != null) {
            this.ab(this.i);
        }
    };
    CheckboxListView.prototype.ab = function (a) {
        var b = a.rootWrapper.getChildAt(0);
        this.k = b;
        this.b.w = new XInputGroup();
        var c = a.getSubRenderer(b);
        this.b.w.provideContainer(c);
        var d = c.getExternal(this.b.w, c.rootWrapper, c.getExternal(this.b, null, null));
        this.b.w.d = this.b.y;
        this.b.w.p = this.b.baseTheme;
        this.b.w.t = this.b.density;
        var e = a.createElement("div");
        var f = a.getSubRenderer(e);
        var g = new XPrefix();
        g.provideContainer(f);
        var h = f.getExternal(g, f.rootWrapper, f.getExternal(this.b, null, null));
        var i = a.createElement("div");
        var j = a.getSubRenderer(i);
        this.c = new XIcon();
        this.c.provideContainer(j);
        this.c.fill = this.b.searchIconColor;
        this.c.svgPath = CheckboxList.cl;
        var k = f.getExternal(this.c, j.rootWrapper, j.getExternal(this.b, null, null));
        g.appendContentChild(i);
        this.b.w.appendContentChild(e);
        this.b.w.inputs.add(g);
        var l = a.createElement("div");
        l.setRawStyleProperty("flex-grow", "1");
        var m = a.getSubRenderer(l);
        this.b.u = new XInput();
        this.b.u.provideContainer(m);
        this.b.u.b8 = "text";
        var n = m.getExternal(this.b.u, m.rootWrapper, m.getExternal(this.b, null, null));
        if (this.b.b4 != null) {
            this.b.u.cg = this.b.b4;
        }
        this.b.w.appendContentChild(l);
        this.b.w.inputs.add(this.b.u);
        this.b.dl();
    };
    CheckboxListView.prototype.x = function () {
        if (this.i != null) {
            var a = this.i.rootWrapper.getChildAt(3);
            a.setStyleProperty("width", "100%");
            a.setStyleProperty("margin", "4px 0px 0px 0px");
            if (!this.b.a3 && !this.b.showSelectAll) {
                a.setStyleProperty("height", "100%");
            }
            else {
                var b = this.b.a9();
                a.setStyleProperty("height", "calc(100% - " + b + "px");
            }
        }
    };
    CheckboxListView.prototype.r = function (a, b, c) {
        var d = null;
        if (a.getChildCount() == 0) {
            d = new XCheckbox();
            var e = this.i.getSubRenderer(a);
            d.provideContainer(e);
            var f = this.i.getExternal(d, e.rootWrapper, this.i.getExternal(this.b, null, null));
            this.e.addItem(a, d);
            d.n = this.b.baseTheme;
            d.y = true;
            d.change = delegateCombine(d.change, runOn(this, this.n));
            var g = this.i.createElement("div");
            a.setStyleProperty("display", "flex");
            a.setStyleProperty("height", "100%");
            a.setStyleProperty("align-items", "center");
            switch (this.b.density) {
                case 1:
                    a.setStyleProperty("margin-top", "-4px");
                    break;
                case 2:
                    a.setStyleProperty("margin-top", "-1px");
                    break;
                case 4:
                case 3:
                    a.setStyleProperty("margin-top", "1px");
                    break;
            }
            a.append(g);
        }
        else {
            d = this.e.item(a);
        }
        if (d != null) {
            var h = d.z;
            try {
                d.z = true;
                d.ar = this.b.a7;
                d.a4 = b;
                if (c) {
                    if (this.b.indexType == 0) {
                        d.checked = false;
                    }
                    else {
                        d.checked = true;
                    }
                }
                else {
                    if (this.b.indexType == 0) {
                        d.checked = true;
                    }
                    else {
                        d.checked = false;
                    }
                }
            }
            finally {
                d.z = h;
            }
            d.dk = this.b.et;
            d.dd = this.b.er;
            d.dl = this.b.eu;
            d.de = this.b.es;
            d.dm = this.b.ev;
        }
    };
    CheckboxListView.prototype.s = function (a, b, c, d, e, f, g, h, i, j, k) {
        var _this = this;
        var l = null;
        var m = null;
        var n = null;
        var o = null;
        if (a.getChildCount() == 0) {
            o = new XIcon();
            l = new XLabel();
            m = new XLabel();
            a.setStyleProperty("display", "flex");
            a.setStyleProperty("align-items", "center");
            a.setStyleProperty("height", "100%");
            var p = this.i.createElement("div");
            var q = this.i.getSubRenderer(p);
            o.provideContainer(q);
            o.ap = 24;
            o.as = 24;
            p.setStyleProperty("margin-right", "10px");
            var r = this.i.createElement("div");
            var s = this.i.getSubRenderer(r);
            l.provideContainer(s);
            var t = this.i.createElement("div");
            var u = this.i.getSubRenderer(t);
            m.provideContainer(u);
            this.h.addItem(a, l);
            this.g.addItem(a, m);
            this.f.addItem(a, o);
            n = new XIcon();
            var v = this.i.createElement("div");
            var w = this.i.getSubRenderer(v);
            n.provideContainer(w);
            v.setStyleProperty("height", "100%");
            v.setStyleProperty("margin-left", "-4px");
            n.al = 16;
            n.at = 16;
            n.ap = 16;
            n.as = 16;
            n.ar = 2;
            n.svgPath = "<svg width=\"16\" height=\"16\" viewBox=\"0 2 24 24\" fill=\"none\" stroke=\"rgba(0, 0, 0, 255)\" xmlns=\"http://www.w3.org/2000/svg\">\r\n" + "<path d=\"M20 11.1205L16.2166 14.8795L12.4575 11.1205\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n" + "</svg>\r\n";
            n.dp = BrushUtil.h(120, 0, 0, 0);
            n.ao = DeviceUtils.g(1);
            r.setStyleProperty("display", "flex");
            r.setStyleProperty("height", "100%");
            r.setStyleProperty("align-items", "center");
            r.setStyleProperty("justify-content", "start");
            r.setStyleProperty("flex", "auto");
            t.setStyleProperty("display", "flex");
            t.setStyleProperty("height", "100%");
            t.setStyleProperty("align-items", "center");
            t.setStyleProperty("justify-content", "center");
            t.setStyleProperty("flex-direction", "column");
            a.append(p);
            a.append(r);
            a.append(t);
            a.append(v);
        }
        else {
            l = this.h.item(a);
            m = this.g.item(a);
            o = this.f.item(a);
        }
        if (l != null) {
            try {
                o.svg = null;
                o.cu = null;
                o.az = null;
                var x = e != null ? e : ((function () {
                    var $ret = new FontInfo();
                    $ret.f = g;
                    $ret.q = f;
                    return $ret;
                })());
                l.ak = true;
                l.p = this.b.baseTheme;
                l.y = x;
                l.text = c;
                l.l = 0;
                var y = a.getChildAt(0);
                var z = h != null || i != null || k != null;
                var aa = false;
                y.setStyleProperty("width", z ? "24px" : "0px");
                if (i != null) {
                    aa = true;
                    o.cu = i;
                    var ab = ((function () {
                        var $ret = new DataContext();
                        $ret.series = _this;
                        $ret.item = null;
                        $ret.itemBrush = ((function () {
                            var $ret = new Brush();
                            $ret.color = Color.u(255, 0, 0, 0);
                            $ret.fill = "black";
                            return $ret;
                        })());
                        return $ret;
                    })());
                    o.az = ab;
                }
                else if (h != null) {
                    var ac = typeCast(IDataLegendTarget_$type, h);
                    var ad = ac.getDataLegendSeries();
                    if (ad != null) {
                        for (var ae = 0; ae < ad.length; ae++) {
                            var af = ad[ae];
                            var ag = af.getDataLegendSeriesTitle();
                            if (c == ag || c + " " + d == ag) {
                                aa = true;
                                o.cu = af.getDataLegendBadge();
                                o.az = af.getDataLegendBadgeContext();
                                break;
                            }
                        }
                    }
                    y.setStyleProperty("padding-bottom", "6px");
                }
                else if (k != null) {
                    aa = true;
                    o.aq = 0;
                    o.ar = 0;
                    o.al = 24;
                    o.at = 24;
                    o.ap = 24;
                    o.as = 24;
                    o.dh = BrushUtil.h(0, 255, 255, 255);
                    o.fill = BrushUtil.h(0, 255, 255, 255);
                    o.dp = BrushUtil.h(0, 255, 255, 255);
                    o.di = BrushUtil.h(0, 255, 255, 255);
                    o.svg = k;
                }
                if (!aa) {
                    o.view.af();
                }
                var ah = a.getChildAt(2);
                var ai = a.getChildAt(3);
                if (stringIsNullOrEmpty(d)) {
                    ah.setStyleProperty("display", "none");
                    ai.setStyleProperty("display", "none");
                    return;
                }
                else {
                    ah.setStyleProperty("display", "flex");
                    ai.setStyleProperty("display", "flex");
                }
                m.p = this.b.baseTheme;
                x.f = x.f - 2;
                m.ak = true;
                m.y = x;
                m.text = d;
                m.dj = BrushUtil.h(180, 0, 0, 0);
                m.l = 0;
            }
            finally {
            }
        }
    };
    CheckboxListView.prototype.ae = function () {
        var e_1, _a;
        if (this.e != null) {
            try {
                for (var _b = __values(fromEnum(this.e)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var a = _c.value;
                    var b = a.value;
                    b.n = this.b.baseTheme;
                }
            }
            catch (e_1_1) {
                e_1 = { error: e_1_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_1)
                        throw e_1.error;
                }
            }
        }
        if (this.a != null) {
            this.a.n = this.b.baseTheme;
        }
    };
    CheckboxListView.prototype.ac = function () {
    };
    CheckboxListView.prototype.n = function (a, b) {
        var c = a;
        var d = parseInt(c.a4.toString());
        var e = c.checked;
        if (e == true) {
            if (this.b.indexType == 0) {
                this.b.d0(d);
            }
            else {
                this.b.cz(d);
            }
        }
        else {
            if (this.b.indexType == 0) {
                this.b.cz(d);
            }
            else {
                this.b.d0(d);
            }
        }
        this.b.di(d, e);
        this.al(false);
    };
    CheckboxListView.prototype.o = function () {
    };
    CheckboxListView.prototype.y = function (a, b) {
        var e_2, _a;
        try {
            for (var _b = __values(fromEnum(this.e)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                var d = c.value;
                var e = parseInt(d.a4.toString());
                if (e == a) {
                    d.checked = b;
                    this.b.di(e, b);
                }
            }
        }
        catch (e_2_1) {
            e_2 = { error: e_2_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_2)
                    throw e_2.error;
            }
        }
        this.al();
    };
    CheckboxListView.prototype.z = function (a) {
        var e_3, _a;
        try {
            for (var _b = __values(fromEnum(this.e)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                var c = b.value;
                c.checked = a;
            }
        }
        catch (e_3_1) {
            e_3 = { error: e_3_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_3)
                    throw e_3.error;
            }
        }
    };
    CheckboxListView.prototype.u = function (a) {
        this.m = a;
        if (null != this.m) {
            this.m.setStyleProperty("margin", "5px 0px 4px 0px");
        }
    };
    CheckboxListView.prototype.am = function () {
        var a = this.i;
        if (null == a || null == this.m) {
            return;
        }
        var b = a.createElement("div");
        var c = a.getSubRenderer(b);
        this.a = new XCheckbox();
        this.a.provideContainer(c);
        var d = this.i.getExternal(this.a, c.rootWrapper, this.i.getExternal(this.b, null, null));
        this.a.n = this.b.baseTheme;
        this.l = a.createElement("label");
        this.l.setRawText(this.b.cp);
        this.l.setStyleProperty("font-size", "13px");
        this.m.setStyleProperty("display", "flex");
        this.m.setStyleProperty("flex-direction", "row");
        this.m.setStyleProperty("font-family", "Verdana");
        this.m.setStyleProperty("align-items", "center");
        this.m.append(b);
        this.m.append(this.l);
        this.an();
        this.ak();
        var e = this.a;
        e.change = delegateCombine(e.change, runOn(this, this.w));
        this.a.y = true;
    };
    CheckboxListView.prototype.ak = function () {
        if (null != this.l) {
            this.l.setRawText(this.b.cp);
            NativeUI.q(this.l, this.b.ep);
        }
    };
    CheckboxListView.prototype.an = function () {
        if (null != this.l) {
            var a = this.b.showSelectAll ? "flex" : "none";
            this.m.setStyleProperty("display", a);
        }
    };
    CheckboxListView.prototype.aj = function () {
        if (this.k != null) {
            this.k.setStyleProperty("display", this.b.a3 ? "block" : "none");
        }
        if (this.j != null) {
            this.j.setStyleProperty("display", this.b.a3 ? "block" : "none");
        }
    };
    CheckboxListView.prototype.al = function (a) {
        if (a === void 0) {
            a = true;
        }
        if (this.a == null) {
            return;
        }
        var b = this.d;
        this.d = true;
        var c = this.a.z;
        this.a.z = a;
        try {
            if (this.b.a0) {
                this.a.indeterminate = true;
                return;
            }
            this.a.indeterminate = false;
            if (this.b.indexType == 0) {
                this.a.checked = this.b.keys.count == 0;
            }
            else {
                this.a.checked = this.b.keys.count != 0;
            }
        }
        finally {
            this.a.z = c;
            this.d = b;
        }
    };
    CheckboxListView.prototype.w = function (a, b) {
        if (this.d || b.isIndeterminate) {
            return;
        }
        if (b.isChecked) {
            this.b.d3();
            this.b.dr(b.isChecked);
        }
        else {
            this.b.c5();
            this.b.dr(b.isChecked);
        }
    };
    CheckboxListView.prototype.ai = function () {
        var a = this.i;
        if (null == a) {
            return;
        }
        var b = a.rootWrapper;
        if (null != b) {
            NativeUI.q(b, this.b.e7);
            NativeUI.m(b, this.b.backgroundColor);
        }
    };
    CheckboxListView.prototype.ag = function () {
        if (this.c != null) {
            this.c.fill = this.b.searchIconColor;
        }
    };
    CheckboxListView.prototype.ah = function () {
        if (this.b.am != null) {
            this.l.setStyleProperty("font", this.b.am.fontString);
        }
        else {
            this.l.setStyleProperty("font-family", "Verdana");
            this.l.setStyleProperty("font-size", 13 + "px");
        }
    };
    CheckboxListView.prototype.ad = function () {
        if (this.a == null) {
            return;
        }
        this.a.dk = this.b.et;
        this.a.dd = this.b.er;
        this.a.dl = this.b.eu;
        this.a.de = this.b.es;
        this.a.dm = this.b.ev;
    };
    CheckboxListView.prototype.af = function (a) {
        if (this.j != null) {
            NativeUI.w(this.j, a);
        }
    };
    CheckboxListView.prototype.t = function (a) {
        this.j = a;
    };
    CheckboxListView.prototype.v = function () {
        var e_4, _a;
        try {
            for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var a = _c.value;
                a.value.cu = null;
                a.value.az = null;
            }
        }
        catch (e_4_1) {
            e_4 = { error: e_4_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_4)
                    throw e_4.error;
            }
        }
    };
    CheckboxListView.$t = markType(CheckboxListView, 'CheckboxListView');
    return CheckboxListView;
}(Base));
export { CheckboxListView };
/**
 * @hidden
 */
var CheckboxList = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CheckboxList, _super);
    function CheckboxList() {
        var _this = _super.call(this) || this;
        _this._view = null;
        _this.f = null;
        _this.j = null;
        _this.ai = null;
        _this.ag = null;
        _this.aj = null;
        _this.ah = null;
        _this.d = null;
        _this.aq = false;
        _this.c = null;
        _this.t = null;
        _this.v = null;
        _this.ar = false;
        _this.ao = null;
        _this.g = new GridSelectedKeysCollection();
        _this.a = null;
        _this.propertyChanged = null;
        _this.selectedKeyAdded = null;
        _this.selectedKeyRemoved = null;
        _this.checkedChanged = null;
        _this.labelClicked = null;
        _this.bg = null;
        _this.bj = null;
        _this.bf = null;
        _this.bn = null;
        _this.bl = null;
        _this.bm = null;
        _this.bk = null;
        _this.x = 3;
        _this.bb = -1;
        _this.ak = null;
        _this.k = 1;
        _this.ac = 1;
        _this.ae = 2;
        _this.el = BrushUtil.h(255, 24, 29, 31);
        _this.ej = null;
        _this.at = true;
        _this.em = null;
        _this.ek = null;
        _this.al = null;
        _this.ee = null;
        _this.ec = null;
        _this.ef = null;
        _this.ed = null;
        _this.eg = null;
        _this.a6 = NaN;
        _this.aa = 0;
        _this.ei = null;
        _this.indexTypeChanged = null;
        _this.as = false;
        _this.co = null;
        _this.en = null;
        _this.ea = CheckboxList.ey;
        _this.a4 = true;
        _this.eb = CheckboxList.ew;
        _this.eh = CheckboxList.ex;
        _this.eo = CheckboxList.ey;
        _this.keysCleared = null;
        _this.selectAllCheckboxChanged = null;
        _this.bd = -1;
        _this.a2 = true;
        _this.ay = true;
        _this.au = false;
        var a = _this.g;
        a.collectionChanged = delegateCombine(a.collectionChanged, runOn(_this, _this.du));
        _this.g.am(runOn(_this, _this.dt));
        _this.d = new FilterFactory();
        var b = new CheckboxListView();
        b.b = _this;
        _this.view = b;
        _this.view.q();
        return _this;
    }
    Object.defineProperty(CheckboxList.prototype, "view", {
        get: function () {
            return this._view;
        },
        set: function (a) {
            this._view = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "w", {
        get: function () {
            return this.v;
        },
        set: function (a) {
            this.v = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "u", {
        get: function () {
            return this.t;
        },
        set: function (a) {
            this.t = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "e", {
        get: function () {
            if (this.f == null) {
                return null;
            }
            return this.f.actualDataSource;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "ap", {
        get: function () {
            if (this.ao == null) {
                this.ao = new SRProvider(this.view.i);
                this.ao.cb("DataGrid");
            }
            return this.ao;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "keys", {
        get: function () {
            return this.g;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "primaryKey", {
        get: function () {
            return this.a;
        },
        set: function (a) {
            var b = this.a;
            this.a = a;
            if (b != this.a) {
                this.dp("PrimaryKey", b, this.a);
            }
        },
        enumerable: false,
        configurable: true
    });
    CheckboxList.prototype.clearSelectedKeys = function () {
        this.keys.clear();
        if (this.keysCleared != null) {
            this.keysCleared(this, new CheckboxListKeysClearedEventArgs());
        }
    };
    CheckboxList.prototype.addSelectedKey = function (a, b) {
        this.keys.add(new PrimaryKeyValue(a, b));
    };
    CheckboxList.prototype.insertSelectedKey = function (a, b, c) {
        this.keys.insert(a, new PrimaryKeyValue(b, c));
    };
    CheckboxList.prototype.removeSelectedKeyAt = function (a) {
        this.keys.removeAt(a);
    };
    CheckboxList.prototype.dt = function () {
        this.db();
        if (this.keysCleared != null) {
            this.keysCleared(this, new CheckboxListKeysClearedEventArgs());
        }
    };
    CheckboxList.prototype.du = function (a, b) {
        if (this.e == null || this.e.actualSchema == null || this.aq) {
            return;
        }
        switch (b.action) {
            case 0:
                for (var c = 0; c < b.newItems.count; c++) {
                    this.dm(b.newItems.item(c));
                }
                break;
            case 1:
                for (var d = 0; d < b.oldItems.count; d++) {
                    this.dn(b.oldItems.item(d));
                }
                break;
            case 2:
                for (var e = 0; e < b.oldItems.count; e++) {
                    this.dn(b.oldItems.item(e));
                }
                for (var f = 0; f < b.newItems.count; f++) {
                    this.dm(b.newItems.item(f));
                }
                break;
            case 4:
                this.view.z(this.indexType == 0);
                for (var g = 0; g < this.keys.ae.count; g++) {
                    this.dm(this.keys.ae._inner[g]);
                }
                break;
        }
    };
    CheckboxList.prototype.dm = function (a) {
        var _this = this;
        var b = this.e.indexOfKey(a.value);
        if (b >= 0) {
            this.view.y(b, this.indexType == 1);
        }
        if (this.selectedKeyAdded == null) {
            return;
        }
        this.selectedKeyAdded(this, ((function () {
            var $ret = new CheckedChangedEventArgs();
            $ret.c = b;
            $ret.b = _this.indexType == 1;
            $ret.a = a.value;
            return $ret;
        })()));
    };
    CheckboxList.prototype.dn = function (a) {
        var _this = this;
        var b = this.e.indexOfKey(a.value);
        if (b >= 0) {
            this.view.y(b, this.indexType == 0);
        }
        if (this.selectedKeyRemoved == null) {
            return;
        }
        this.selectedKeyRemoved(this, ((function () {
            var $ret = new CheckedChangedEventArgs();
            $ret.c = b;
            $ret.b = _this.indexType == 0;
            $ret.a = a.value;
            return $ret;
        })()));
    };
    CheckboxList.prototype.di = function (a, b) {
        if (this.checkedChanged != null && this.ar == false) {
            var c_1 = null;
            if (this.e.actualPrimaryKey != null && this.e.actualPrimaryKey.length > 0) {
                c_1 = new Array(this.e.actualPrimaryKey.length);
                for (var d = 0; d < this.e.actualPrimaryKey.length; d++) {
                    c_1[d] = this.e.getItemPropertyAtIndex(a, this.e.actualPrimaryKey[d]);
                }
            }
            this.checkedChanged(this, ((function () {
                var $ret = new CheckedChangedEventArgs();
                $ret.c = a;
                $ret.b = b;
                $ret.a = c_1;
                return $ret;
            })()));
        }
    };
    CheckboxList.prototype.notifySizeChanged = function () {
        this.view.o();
    };
    CheckboxList.prototype.destroy = function () {
        if (this.f != null) {
            var a = this.f;
            a.cellClicked = delegateRemove(a.cellClicked, runOn(this, this.c7));
            var b = this.f;
            b.sizeChanged = delegateRemove(b.sizeChanged, runOn(this, this.c8));
            if (this.f.actualDataSource != null) {
                var c = this.f.actualDataSource;
                c.schemaChanged = delegateRemove(c.schemaChanged, runOn(this, this.dq));
            }
        }
        if (this.t != null) {
            var d = this.t;
            d.change = delegateRemove(d.change, runOn(this, this.c9));
        }
        this.provideContainer(null, null, null);
        if (this.j != null) {
            var e = this.j;
            e.cellUpdating = delegateRemove(e.cellUpdating, runOn(this, this.c3));
        }
    };
    CheckboxList.prototype.provideContainer = function (a, b, c) {
        this.f = b;
        if (null != this.f) {
            this.f.scrollbarStyle = 1;
            var d = this.f;
            d.sizeChanged = delegateCombine(d.sizeChanged, runOn(this, this.c8));
            this.f.scrollbarBackground = this.e0;
            this.f.headerHeight = 0;
            this.f.rowSeparatorHeight = 0;
            this.f.defaultColumnMinWidth = NaN;
            this.f.autoGenerateColumns = false;
            this.f.activationMode = 0;
            this.f.editMode = 0;
            var e = this.f;
            e.cellClicked = delegateCombine(e.cellClicked, runOn(this, this.c7));
            if (this.bg != null) {
                this.f.itemsSource = this.bg;
                this.c2();
                this.ds();
            }
            if (this.bj != null) {
                this.ds();
                this.d6();
            }
        }
        this.view.u(c);
        if (this.av) {
            this.d8();
        }
        this.view.p(a);
    };
    CheckboxList.prototype.c8 = function (a, b) {
        this.f.scrollbarStyle = this.ab;
    };
    CheckboxList.prototype.provideSelectAllSection = function (a) {
        this.view.u(a);
    };
    CheckboxList.prototype.c7 = function (a, b) {
        if (!this.av && b.cellInfo.l.a5 == 0 || this.av && b.cellInfo.l.a5 == 1) {
            return;
        }
        var c = b.cellInfo.l.x;
        if (-1 == c) {
            return;
        }
        var d = b.cellInfo.hn;
        var e = this.i(d);
        if (this.a1) {
            if (this.keys.contains(e)) {
                if (this.ai != null) {
                    this.ai.setPropertyValue(d, false);
                }
                this.keys.remove(e);
            }
            else {
                if (this.ai != null) {
                    this.ai.setPropertyValue(d, true);
                }
                this.keys.add(e);
            }
        }
        this.de(c, this.keys.contains(e));
    };
    CheckboxList.prototype.de = function (a, b) {
        var c = null;
        if (this.e.actualPrimaryKey != null && this.e.actualPrimaryKey.length > 0) {
            c = new Array(this.e.actualPrimaryKey.length);
            for (var d = 0; d < this.e.actualPrimaryKey.length; d++) {
                c[d] = this.e.getItemPropertyAtIndex(a, this.e.actualPrimaryKey[d]);
            }
        }
        if (this.labelClicked == null) {
            return;
        }
        this.labelClicked(this, ((function () {
            var $ret = new CheckedChangedEventArgs();
            $ret.c = a;
            $ret.b = b;
            $ret.a = c;
            return $ret;
        })()));
    };
    CheckboxList.prototype.c3 = function (a, b) {
        var c = b.cellInfo.l.x;
        if (-1 == c) {
            return;
        }
        var d = false;
        if (b.cellInfo.hn != null) {
            var e = this.i(b.cellInfo.hn);
            if (this.keys.contains(e)) {
                d = true;
            }
        }
        this.view.r(b.content.element, c, d);
    };
    CheckboxList.prototype.d7 = function (a, b) {
        var c = b.cellInfo.l.x;
        if (-1 == c) {
            return;
        }
        var d = null;
        var e = null;
        var f = null;
        var g = null;
        var h = null;
        if (b.cellInfo.hn != null) {
            d = this.ag.getPropertyValue(b.cellInfo.hn);
            if (this.aj != null) {
                e = this.aj.getPropertyValue(b.cellInfo.hn);
            }
            if (this.ah != null) {
                var i = EnumUtil.getEnumValue(DataSeriesPropertyType_$type, this.ah.getPropertyValue(b.cellInfo.hn));
                if (i == 0) {
                    h = SvgIconRegistry.instance.getSvgPathString("ChartToolbarIcons", "string-field");
                }
                else if (i == 2) {
                    h = SvgIconRegistry.instance.getSvgPathString("ChartToolbarIcons", "numeric-field");
                }
                else if (i == 1) {
                    h = SvgIconRegistry.instance.getSvgPathString("ChartToolbarIcons", "date-time-field");
                }
            }
        }
        this.view.s(b.content.element, c, d, e, this.ak, "Verdana", 13, this.bf, f, g, h);
    };
    CheckboxList.prototype.dj = function (a) {
        if (this.bj != null) {
            var b = this.d.property(this.bj).cast(enumGetBox(DataSourceSchemaPropertyType_$type, 0)).toLower();
            var c = b.contains(a);
            if (!this.f.filterExpressions.k.contains(this.c)) {
                this.c = c;
                this.f.filterExpressions.add(this.c);
            }
            else {
                var d = this.f.filterExpressions.k.indexOf(this.c);
                this.f.filterExpressions.k.item(d, this.c = c);
            }
        }
    };
    Object.defineProperty(CheckboxList.prototype, "itemsSource", {
        get: function () {
            return this.bg;
        },
        set: function (a) {
            var b = this.bg;
            this.bg = a;
            if (b != this.bg) {
                this.dp("ItemsSource", b, this.bg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "dataMemberPath", {
        get: function () {
            return this.bj;
        },
        set: function (a) {
            var b = this.bj;
            this.bj = a;
            if (b != this.bj) {
                this.dp("DataMemberPath", b, this.bj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "bh", {
        get: function () {
            return this.bf;
        },
        set: function (a) {
            var b = this.bf;
            this.bf = a;
            if (b != this.bf) {
                this.dp("DataLegendTarget", b, this.bf);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "cw", {
        get: function () {
            return this.bn;
        },
        set: function (a) {
            var b = this.bn;
            this.bn = a;
            if (b != this.bn) {
                this.dp("SubtitleMemberPath", b, this.bn);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "cb", {
        get: function () {
            return this.bl;
        },
        set: function (a) {
            var b = this.bl;
            this.bl = a;
            if (b != this.bl) {
                this.dp("PropertyTypeMemberPath", b, this.bl);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "selectedMemberPath", {
        get: function () {
            return this.bm;
        },
        set: function (a) {
            var b = this.bm;
            this.bm = a;
            if (b != this.bm) {
                this.dp("SelectedMemberPath", b, this.bm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "b4", {
        get: function () {
            return this.bk;
        },
        set: function (a) {
            var b = this.bk;
            this.bk = a;
            if (b != this.bk) {
                this.dp("FilterPlaceholderText", b, this.bk);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "y", {
        get: function () {
            return this.x;
        },
        set: function (a) {
            var b = this.x;
            this.x = a;
            if (b != this.x) {
                this.dp("SearchInputType", enumGetBox(InputGroupDisplayType_$type, b), enumGetBox(InputGroupDisplayType_$type, this.x));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "be", {
        get: function () {
            return this.bb;
        },
        set: function (a) {
            var b = this.bb;
            this.bb = a;
            if (b != this.bb) {
                this.dp("RowHeight", b, this.bb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "bc", {
        get: function () {
            if (this.f != null) {
                return this.f.actualRowHeight;
            }
            else if (this.bb != -1) {
                return this.bb;
            }
            else {
                switch (this.density) {
                    case 4:
                    case 3: return GridStyleRepository.q;
                    case 0:
                    case 2: return GridStyleRepository.r;
                    case 1: return GridStyleRepository.p;
                }
                return GridStyleRepository.r;
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "am", {
        get: function () {
            return this.ak;
        },
        set: function (a) {
            var b = this.ak;
            this.ak = a;
            if (b != this.ak) {
                this.dp("CellTextStyle", b, this.ak);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "indexType", {
        get: function () {
            return this.k;
        },
        set: function (a) {
            var b = this.k;
            this.k = a;
            if (b != this.k) {
                this.dp("IndexType", enumGetBox(CheckboxListIndexType_$type, b), enumGetBox(CheckboxListIndexType_$type, this.k));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "baseTheme", {
        get: function () {
            return this.ac;
        },
        set: function (a) {
            var b = this.ac;
            this.ac = a;
            if (b != this.ac) {
                this.dp("BaseTheme", enumGetBox(BaseControlTheme_$type, b), enumGetBox(BaseControlTheme_$type, this.ac));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "density", {
        get: function () {
            return this.ae;
        },
        set: function (a) {
            var b = this.ae;
            this.ae = a;
            if (b != this.ae) {
                this.dp("Density", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, this.ae));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "searchIconColor", {
        get: function () {
            return this.el;
        },
        set: function (a) {
            var b = this.el;
            this.el = a;
            if (b != this.el) {
                this.dp("SearchIconColor", b, this.el);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "e1", {
        get: function () {
            return this.ej;
        },
        set: function (a) {
            var b = this.ej;
            this.ej = a;
            if (b != this.ej) {
                this.dp("SearchBackgroundColor", b, this.ej);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "a1", {
        get: function () {
            return this.at;
        },
        set: function (a) {
            var b = this.at;
            this.at = a;
            if (b != this.at) {
                this.dp("LabelClickTriggersChange", b, this.at);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "searchTextColor", {
        get: function () {
            return this.em;
        },
        set: function (a) {
            var b = this.em;
            this.em = a;
            if (b != this.em) {
                this.dp("SearchTextColor", b, this.em);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "e2", {
        get: function () {
            return this.ek;
        },
        set: function (a) {
            var b = this.ek;
            this.ek = a;
            if (b != this.ek) {
                this.dp("SearchBorderColor", b, this.ek);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "an", {
        get: function () {
            return this.al;
        },
        set: function (a) {
            var b = this.al;
            this.al = a;
            if (b != this.al) {
                this.dp("SearchTextStyle", b, this.al);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "et", {
        get: function () {
            return this.ee;
        },
        set: function (a) {
            var b = this.ee;
            this.ee = a;
            if (b != this.ee) {
                this.dp("CheckboxTickColor", b, this.ee);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "er", {
        get: function () {
            return this.ec;
        },
        set: function (a) {
            var b = this.ec;
            this.ec = a;
            if (b != this.ec) {
                this.dp("CheckboxCheckedBackgroundColor", b, this.ec);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "eu", {
        get: function () {
            return this.ef;
        },
        set: function (a) {
            var b = this.ef;
            this.ef = a;
            if (b != this.ef) {
                this.dp("CheckboxUncheckedBackgroundColor", b, this.ef);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "es", {
        get: function () {
            return this.ed;
        },
        set: function (a) {
            var b = this.ed;
            this.ed = a;
            if (b != this.ed) {
                this.dp("CheckboxCheckedBorderColor", b, this.ed);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "ev", {
        get: function () {
            return this.eg;
        },
        set: function (a) {
            var b = this.eg;
            this.eg = a;
            if (b != this.eg) {
                this.dp("CheckboxUncheckedBorderColor", b, this.eg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "a7", {
        get: function () {
            return this.a6;
        },
        set: function (a) {
            var b = this.a6;
            this.a6 = a;
            if (b != this.a6) {
                this.dp("CheckboxCornerRadius", b, this.a6);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "ab", {
        get: function () {
            return this.aa;
        },
        set: function (a) {
            var b = this.aa;
            this.aa = a;
            if (b != this.aa) {
                this.dp("ScrollbarStyle", enumGetBox(ScrollbarStyle_$type, b), enumGetBox(ScrollbarStyle_$type, this.aa));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "e0", {
        get: function () {
            return this.ei;
        },
        set: function (a) {
            var b = this.ei;
            this.ei = a;
            if (b != this.ei) {
                this.dp("ScrollbarBackground", b, this.ei);
            }
        },
        enumerable: false,
        configurable: true
    });
    CheckboxList.prototype.dp = function (a, b, c) {
        if (this.propertyChanged != null) {
            this.propertyChanged(this, new PropertyChangedEventArgs(a));
        }
        this.dv(a, b, c);
    };
    CheckboxList.prototype.dv = function (a, b, c) {
        switch (a) {
            case "IndexType":
                this.keys.clear();
                this.db();
                if (this.keysCleared != null) {
                    this.keysCleared(this, new CheckboxListKeysClearedEventArgs());
                }
                this.view.al();
                this.dk(b, c);
                break;
            case "ItemsSource":
                if (this.f != null) {
                    this.indexType = 1;
                    if (c != null) {
                        this.f.groupDescriptions.n();
                        this.f.sortDescriptions.n();
                        this.f.filterExpressions.clear();
                        this.f.summaryDescriptions.n();
                    }
                    if (this.f.actualDataSource != null) {
                        var d = this.f.actualDataSource;
                        d.schemaChanged = delegateRemove(d.schemaChanged, runOn(this, this.dq));
                    }
                    this.f.itemsSource = this.bg;
                    this.c2();
                    if (this.f.actualDataSource != null) {
                        var e = this.f.actualDataSource;
                        e.schemaChanged = delegateCombine(e.schemaChanged, runOn(this, this.dq));
                    }
                    this.ar = true;
                    this.ds();
                    this.ar = false;
                    this.view.al();
                }
                break;
            case "DataMemberPath":
            case "SelectedMemberPath":
            case "SubtitleMemberPath":
            case "PropertyTypeMemberPath":
                if (this.f != null) {
                    if (this.bj != null) {
                        this.ds();
                        this.d6();
                    }
                }
                break;
            case "PrimaryKey":
                if (this.f != null) {
                    this.f.primaryKey = this.primaryKey;
                }
                break;
            case "SelectAllCaptionTextColor":
                this.ep = null != this.e5 ? this.e5 : CheckboxList.ey;
                break;
            case "SelectAllCaption":
            case "ActualSelectAllCaptionTextColor":
                this.view.ak();
                break;
            case "showSelectAll":
                this.view.an();
                this.view.x();
                break;
            case "ShowFilter":
                this.view.aj();
                this.view.x();
                break;
            case "FilterPlaceholderText":
                if (this.t != null) {
                    this.t.cg = this.b4;
                }
                break;
            case "SearchInputType":
                if (this.v != null) {
                    this.v.d = this.y;
                }
                break;
            case "RowHeight":
                if (this.f != null) {
                    this.f.rowHeight = this.be;
                }
                break;
            case "CellTextStyle":
                if (this.f != null) {
                    this.f.cellTextStyle = this.am;
                }
                this.view.ah();
                break;
            case "BackgroundColor":
            case "TextColor":
            case "RowHoverBackgroundColor":
                var f = this.f;
                if (null != f) {
                    f.cellTextColor = this.e7;
                    f.cellBackground = this.backgroundColor;
                    f.cellSelectedBackground = this.backgroundColor;
                    f.rowHoverBackground = this.rowHoverBackgroundColor;
                }
                this.view.ai();
                break;
            case "BaseTheme":
                this.d5();
                break;
            case "Density":
                this.d4();
                break;
            case "IsRowHoverEnabled":
                if (this.f != null) {
                    this.f.isRowHoverEnabled = this.az;
                }
                break;
            case "ScrollbarStyle":
                if (this.f != null) {
                    this.f.scrollbarStyle = this.ab;
                }
                break;
            case "ScrollbarBackground":
                if (this.f != null) {
                    this.f.scrollbarBackground = this.e0;
                }
                break;
            case "SearchIconColor":
                this.view.ag();
                break;
            case "SearchBackgroundColor":
                this.w.mc = this.e1;
                break;
            case "SearchBorderColor":
                this.w.md = this.e2;
                break;
            case "SearchTextColor":
                if (this.u != null) {
                    this.u.d8 = this.searchTextColor;
                }
                break;
            case "SearchTextStyle":
                this.u.af = this.an;
                break;
            case "CheckboxTickColor":
            case "CheckboxCheckedBackgroundColor":
            case "CheckboxUncheckedBackgroundColor":
            case "CheckboxCheckedBorderColor":
            case "CheckboxUncheckedBorderColor":
            case "CheckboxCornerRadius":
                this.view.ad();
                if (this.f != null) {
                    this.f.xq();
                }
                break;
            case "CheckboxAlignedRight":
                if (this.f != null) {
                    this.d8();
                }
                break;
            case "DataLegendTarget":
                if (this.f != null) {
                    this.f.xq();
                }
                break;
        }
    };
    CheckboxList.prototype.d8 = function () {
        if (this.f.actualColumns.count == 0) {
            return;
        }
        var a = this.f.actualColumns._inner[0];
        var b = this.f.actualColumns._inner[1];
        var c = this.f.actualColumns._inner[2];
        this.f.actualColumns.clear();
        if (this.av) {
            this.f.columns.add(b);
            this.f.columns.add(a);
        }
        else {
            this.f.columns.add(a);
            this.f.columns.add(b);
        }
        this.f.columns.add(c);
    };
    CheckboxList.prototype.dk = function (a, b) {
        if (this.indexTypeChanged != null) {
            this.indexTypeChanged(this, ((function () {
                var $ret = new CheckboxListIndexTypeChangedEventArgs();
                $ret.b = EnumUtil.getEnumValue(CheckboxListIndexType_$type, a);
                $ret.a = EnumUtil.getEnumValue(CheckboxListIndexType_$type, b);
                return $ret;
            })()));
        }
    };
    CheckboxList.prototype.d4 = function () {
        if (this.f != null) {
            this.f.density = this.density;
        }
        if (this.v != null) {
            this.v.t = this.density;
        }
        this.view.ac();
    };
    CheckboxList.prototype.d5 = function () {
        if (this.v != null) {
            this.v.p = this.baseTheme;
        }
        if (this.u != null) {
            this.u.d8 = this.searchTextColor;
        }
        if (this.f != null) {
            this.f.cellTextColor = this.e7;
            this.f.cellBackground = this.backgroundColor;
            this.f.cellSelectedBackground = this.backgroundColor;
            this.f.rowHoverBackground = this.rowHoverBackgroundColor;
        }
        this.view.ae();
    };
    CheckboxList.prototype.dq = function (a, b) {
        this.ar = true;
        this.c2();
        if (b.schema != null) {
            this.ds();
            for (var c = 0; c < this.keys.count; c++) {
                this.dm(this.keys._inner[c]);
            }
            this.view.al();
        }
        this.ar = false;
    };
    CheckboxList.prototype.ds = function () {
        if (this.ai == null && this.bm != null && this.bm != "") {
            this.ai = new FastReflectionHelper(false, this.bm);
        }
        if (this.ag == null && this.bj != null && this.bj != "") {
            this.ag = new FastReflectionHelper(false, this.bj);
        }
        if (this.aj == null && this.bn != null && this.bn != "") {
            this.aj = new FastReflectionHelper(false, this.bn);
        }
        if (this.ah == null && this.bl != null && this.bl != "") {
            this.ah = new FastReflectionHelper(false, this.bl);
        }
        if (this.ag != null) {
            this.ag.propertyName = this.bj;
        }
        if (this.aj != null) {
            this.aj.propertyName = this.bn;
        }
        if (this.ah != null) {
            this.ah.propertyName = this.bl;
        }
        if (this.bg != null && this.ai != null && this.f.actualDataSource.actualSchema != null) {
            this.ai.propertyName = this.bm;
            var a = this.f.actualDataSource.actualCount;
            for (var b = 0; b < a; b++) {
                var c = this.f.actualDataSource.getItemAtIndex(b);
                var d = this.i(c);
                var e = this.ai.getPropertyValue(c);
                if (e == true) {
                    if (!this.keys.contains(d)) {
                        this.keys.add(d);
                    }
                }
                else if (this.keys.contains(d)) {
                    this.keys.remove(d);
                }
            }
        }
    };
    CheckboxList.prototype.d6 = function () {
        this.f.actualColumns.clear();
        this.f.primaryKey = this.primaryKey;
        this.f.isGroupRowSticky = false;
        this.f.rowHeight = this.be;
        this.f.cellBackground = this.backgroundColor;
        this.f.cellSelectedBackground = this.backgroundColor;
        this.f.density = this.density;
        this.f.isRowHoverEnabled = this.az;
        this.f.borderWidth = new Thickness(0, 0);
        if (this.am != null) {
            this.f.cellTextStyle = this.am;
        }
        var a = new TemplateColumn();
        if (this.bm == null) {
            this.bm = "";
        }
        a.lo = this.bm;
        a.mf = "CheckboxColumn";
        var b = new ColumnWidth();
        b.c = false;
        b.f = 28;
        a.width = b;
        a.kk = 0;
        a.kl = 0;
        a.cellUpdating = delegateCombine(a.cellUpdating, runOn(this, this.c3));
        this.j = a;
        this.f.columns.add(a);
        var c = this.f.actualDataSource.resolveSchemaPropertyType(this.bj);
        if ((this.bn != null || this.bl != null) && (c == 0 || c == 11 || c == 2)) {
            var d = new TemplateColumn();
            d.lo = this.bj;
            d.mf = "DataColumn";
            d.kk = 0;
            d.g = 0;
            d.cellUpdating = delegateCombine(d.cellUpdating, runOn(this, this.d7));
            this.f.columns.add(d);
        }
        else {
            var e = void 0;
            switch (c) {
                case 8:
                case 9:
                    e = new DateTimeColumn();
                    break;
                case 1:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 10:
                    e = new NumericColumn();
                    break;
                case 2:
                case 11:
                case 0:
                default:
                    e = new TextColumn();
                    break;
            }
            e.lo = this.bj;
            e.mf = "DataColumn";
            e.kk = 0;
            e.g = 0;
            this.f.columns.add(e);
        }
        var f = new TemplateColumn();
        var g = new ColumnWidth();
        g.c = false;
        g.f = 10;
        f.lo = "PaddingColumn";
        f.mf = "PaddingColumn";
        f.kk = 0;
        f.width = g;
        this.f.columns.add(f);
    };
    CheckboxList.prototype.updateHrMargin = function (a) {
        this.view.af(a);
    };
    CheckboxList.prototype.provideHrElement = function (a) {
        this.view.t(a);
    };
    CheckboxList.prototype.dl = function () {
        var a = this.u;
        a.changing = delegateCombine(a.changing, runOn(this, this.c9));
        this.d5();
    };
    CheckboxList.prototype.c9 = function (a, b) {
        var c = b.value.toLowerCase();
        this.dj(c);
    };
    CheckboxList.prototype.i = function (a) {
        if (this.primaryKey == null) {
            return PrimaryKeyValue.createIdentityKey(a);
        }
        var b = new Array(this.primaryKey.length);
        var c = new Array(this.primaryKey.length);
        for (var d = 0; d < b.length; d++) {
            b[d] = this.primaryKey[d];
            c[d] = this.e.getItemProperty(a, b[d]);
        }
        return new PrimaryKeyValue(b, c);
    };
    CheckboxList.prototype.d0 = function (a) {
        this.aq = true;
        var b = this.e.getItemAtIndex(a);
        if (this.ai != null) {
            this.ai.setPropertyValue(b, false);
        }
        var c = this.i(b);
        this.keys.remove(c);
        this.aq = false;
    };
    CheckboxList.prototype.cz = function (a) {
        this.aq = true;
        var b = this.e.getItemAtIndex(a);
        if (this.ai != null) {
            this.ai.setPropertyValue(b, true);
        }
        var c = this.i(b);
        this.keys.add(c);
        this.aq = false;
    };
    CheckboxList.prototype.d3 = function () {
        this.indexType = 0;
        this.keys.clear();
        this.db();
        if (this.keysCleared != null) {
            this.keysCleared(this, new CheckboxListKeysClearedEventArgs());
        }
    };
    CheckboxList.prototype.c5 = function () {
        this.indexType = 1;
        this.keys.clear();
        this.db();
        if (this.keysCleared != null) {
            this.keysCleared(this, new CheckboxListKeysClearedEventArgs());
        }
    };
    CheckboxList.prototype.dg = function (a, b, c) {
        if (this.f != null) {
            this.f.notifySetItem(a, b, c);
        }
    };
    CheckboxList.prototype.dc = function () {
        if (this.f != null) {
            this.f.notifyClearItems();
        }
    };
    CheckboxList.prototype.db = function () {
        if (this.f != null) {
            this.f.invalidateVisibleRows();
        }
    };
    CheckboxList.prototype.dd = function (a, b) {
        if (this.f != null) {
            this.f.notifyInsertItem(a, b);
        }
        ;
    };
    CheckboxList.prototype.df = function (a, b) {
        if (this.f != null) {
            this.f.notifyRemoveItem(a, b);
        }
        ;
    };
    CheckboxList.prototype.refresh = function () {
        if (this.as) {
            return;
        }
        if (this.f != null) {
            this.as = true;
            this.view.v();
            this.f.refresh();
            this.as = false;
        }
    };
    CheckboxList.prototype.c0 = function (a) {
        var b = null;
        if (this.primaryKey == null || this.primaryKey.length == 0) {
            b = new PrimaryKeyValue(null, a);
        }
        else if (this.primaryKey.length == a.length) {
            b = new PrimaryKeyValue(this.primaryKey, a);
        }
        else {
            throw new ArgumentException(1, "value length must match PrimaryKey length");
        }
        if (b != null) {
            if (this.ai != null) {
                var c = this.e.indexOfKey(a);
                var d = this.e.getItemAtIndex(c);
                this.ai.setPropertyValue(d, true);
            }
            this.keys.add(b);
        }
    };
    CheckboxList.prototype.d1 = function (a) {
        var b = null;
        if (this.primaryKey == null || this.primaryKey.length == 0) {
            b = new PrimaryKeyValue(null, a);
        }
        else if (this.primaryKey.length == a.length) {
            b = new PrimaryKeyValue(this.primaryKey, a);
        }
        else {
            throw new ArgumentException(1, "value length must match PrimaryKey length");
        }
        if (this.keys.contains(b)) {
            if (this.ai != null) {
                var c = this.e.indexOfKey(a);
                var d = this.e.getItemAtIndex(c);
                this.ai.setPropertyValue(d, false);
            }
            this.keys.remove(b);
        }
    };
    CheckboxList.prototype.getDesiredSize = function (a) {
        var b = 248;
        var c = 0;
        var d = this.a9();
        var e = 5;
        if (this.f != null && this.f.actualDataSource != null && this.f.actualDataSource.actualCount > 0) {
            e = this.f.actualDataSource.actualCount;
        }
        var f = this.bc * e;
        var g = this.bc * (this.showSelectAll ? 4 : 5);
        var h = f > g ? g : f;
        var i = d + h;
        if (isPositiveInfinity(a.height)) {
            c = i;
        }
        else {
            if (a.height <= i) {
                c = i;
            }
            else {
                var j = a.height - i;
                c = d + j;
            }
        }
        return new Size(1, b, c);
    };
    CheckboxList.prototype.a9 = function () {
        var a = 0;
        a += ComponentSizeHelpers.d(this.density, this.baseTheme);
        a += ComponentSizeHelpers.c(this.density, this.baseTheme);
        a += (0.8 + 6);
        a += 4;
        if (this.showSelectAll) {
            a += this.bc;
        }
        a += 4;
        return a;
    };
    Object.defineProperty(CheckboxList.prototype, "cp", {
        get: function () {
            return this.co != null ? this.co : !stringIsNullOrWhiteSpace(this.ap.b1("Select_All")) ? this.ap.b1("Select_All") : "(Select All)";
        },
        set: function (a) {
            if (a == this.co) {
                return;
            }
            var b = this.co;
            this.co = a;
            this.dp("SelectAllCaption", b, this.co);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "e5", {
        get: function () {
            return this.en;
        },
        set: function (a) {
            var b = this.en;
            this.en = a;
            if (b != this.en) {
                this.dp("SelectAllCaptionTextColor", b, a);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "ep", {
        get: function () {
            return this.ea;
        },
        set: function (a) {
            var b = this.ea;
            this.ea = a;
            if (b != this.ea) {
                this.dp("ActualSelectAllCaptionTextColor", b, a);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "a0", {
        get: function () {
            if (-1 == this.bd) {
                return false;
            }
            var a = this.keys.count;
            if (0 == a) {
                return false;
            }
            if (a == this.bd) {
                return false;
            }
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "showSelectAll", {
        get: function () {
            return this.a4;
        },
        set: function (a) {
            if (a == this.a4) {
                return;
            }
            var b = this.a4;
            this.a4 = a;
            this.dp("showSelectAll", b, this.a4);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "backgroundColor", {
        get: function () {
            return this.eb;
        },
        set: function (a) {
            var b = this.eb;
            this.eb = a;
            if (b != this.eb) {
                this.dp("BackgroundColor", b, a);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "rowHoverBackgroundColor", {
        get: function () {
            return this.eh;
        },
        set: function (a) {
            var b = this.eh;
            this.eh = a;
            if (b != this.eh) {
                this.dp("RowHoverBackgroundColor", b, a);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "e7", {
        get: function () {
            return this.eo;
        },
        set: function (a) {
            var b = this.eo;
            this.eo = a;
            if (b != this.eo) {
                this.dp("TextColor", b, a);
            }
        },
        enumerable: false,
        configurable: true
    });
    CheckboxList.prototype.dr = function (a) {
        if (this.selectAllCheckboxChanged != null) {
            this.selectAllCheckboxChanged(this, ((function () {
                var $ret = new SelectAllCheckboxChangedEventArgs();
                $ret.a = a;
                return $ret;
            })()));
        }
    };
    CheckboxList.prototype.ax = function () {
        if (-1 == this.bd) {
            return true;
        }
        var a = this.keys.count;
        switch (this.indexType) {
            case 0: return this.bd == a;
            case 1: return 0 == a;
            default: return false;
        }
    };
    CheckboxList.prototype.aw = function () {
        if (-1 == this.bd) {
            return false;
        }
        var a = this.keys.count;
        switch (this.indexType) {
            case 0: return 0 == a;
            case 1: return this.bd == a;
            default: return false;
        }
    };
    CheckboxList.prototype.c2 = function () {
        var a = this.f.actualDataSource;
        if (null != a) {
            if (null == a.actualSchema) {
                this.bd = -1;
                return;
            }
            var b = a.actualCount;
            this.bd = b;
        }
        else {
            this.bd = -1;
        }
    };
    Object.defineProperty(CheckboxList.prototype, "a3", {
        get: function () {
            return this.a2;
        },
        set: function (a) {
            if (a == this.a2) {
                return;
            }
            var b = this.a2;
            this.a2 = a;
            this.dp("ShowFilter", b, this.a2);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "az", {
        get: function () {
            return this.ay;
        },
        set: function (a) {
            if (a == this.ay) {
                return;
            }
            var b = this.ay;
            this.ay = a;
            this.dp("IsRowHoverEnabled", b, this.ay);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CheckboxList.prototype, "av", {
        get: function () {
            return this.au;
        },
        set: function (a) {
            if (a == this.au) {
                return;
            }
            var b = this.au;
            this.au = a;
            this.dp("CheckboxAlignedRight", b, this.au);
        },
        enumerable: false,
        configurable: true
    });
    CheckboxList.$t = markType(CheckboxList, 'CheckboxList', Base.$, [INotifyPropertyChanged_$type]);
    CheckboxList.e6 = BrushUtil.h(255, 24, 29, 31);
    CheckboxList.cl = "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z";
    CheckboxList.ew = BrushUtil.h(255, 248, 248, 248);
    CheckboxList.ex = null;
    CheckboxList.ey = BrushUtil.h(255, 24, 29, 31);
    return CheckboxList;
}(Base));
export { CheckboxList };