all files / grid/actions/ excel-filter.js

96% Statements 48/50
94.74% Branches 18/19
94.44% Functions 17/18
95.74% Lines 45/47
11 statements, 6 functions, 9 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72          54× 54× 54× 54× 54×   61×   45×   43× 43× 29×                                      
/* istanbul ignore next */ 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
define(["require", "exports", "../common/excel-filter-base", "./checkbox-filter", "../base/constant"], function (require, exports, excel_filter_base_1, checkbox_filter_1, events) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var ExcelFilter = (function (_super) {
        __extends(ExcelFilter, _super);
        function ExcelFilter(parent, filterSettings, serviceLocator, customFltrOperators) {
            var _this = _super.call(this, parent, filterSettings, serviceLocator) || this;
            _this.parent = parent;
            _this.isresetFocus = true;
            _this.excelFilterBase = new excel_filter_base_1.ExcelFilterBase(parent, customFltrOperators);
            return _this;
        }
        ExcelFilter.prototype.destroy = function () {
            this.excelFilterBase.closeDialog();
        };
        ExcelFilter.prototype.openDialog = function (options) {
            this.excelFilterBase.openDialog(options);
        };
        ExcelFilter.prototype.closeDialog = function () {
            this.excelFilterBase.closeDialog();
            if (this.isresetFocus) {
                this.parent.notify(events.restoreFocus, {});
            }
        };
        ExcelFilter.prototype.clearCustomFilter = function (col) {
            this.excelFilterBase.clearFilter(col);
        };
        ExcelFilter.prototype.closeResponsiveDialog = function (isCustomFilter) {
            if (isCustomFilter) {
                this.excelFilterBase.removeDialog();
            }
            else {
                this.closeDialog();
            }
        };
        ExcelFilter.prototype.applyCustomFilter = function (args) {
            Eif (!args.isCustomFilter) {
                this.excelFilterBase.fltrBtnHandler();
                this.excelFilterBase.closeDialog();
            }
            else {
                this.excelFilterBase.filterBtnClick(args.col.field);
            }
        };
        ExcelFilter.prototype.filterByColumn = function (fieldName, firstOperator, firstValue, predicate, matchCase, ignoreAccent, secondOperator, secondValue) {
            this.excelFilterBase.filterByColumn(fieldName, firstOperator, firstValue, predicate, matchCase, ignoreAccent, secondOperator, secondValue);
        };
        ExcelFilter.prototype.getFilterUIInfo = function () {
            return this.excelFilterBase.getFilterUIInfo();
        };
        ExcelFilter.prototype.getModuleName = function () {
            return 'excelFilter';
        };
        return ExcelFilter;
    }(checkbox_filter_1.CheckBoxFilter));
    exports.ExcelFilter = ExcelFilter;
});