all files / actions/ excel-export.js

100% Statements 29/29
100% Branches 8/8
100% Functions 10/10
100% Lines 29/29
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   135× 135× 135× 135×   27959×     135× 135×         135× 461×   135× 21×   135×                
define(["require", "exports", "@syncfusion/ej2-treegrid", "@syncfusion/ej2-base"], function (require, exports, ej2_treegrid_1, ej2_base_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var ExcelExport = (function () {
        function ExcelExport(gantt) {
            this.parent = gantt;
            ej2_treegrid_1.TreeGrid.Inject(ej2_treegrid_1.ExcelExport);
            this.parent.treeGrid.allowExcelExport = this.parent.allowExcelExport;
            this.bindEvents();
        }
        ExcelExport.prototype.getModuleName = function () {
            return 'excelExport';
        };
        ExcelExport.prototype.destroy = function () {
        };
        ExcelExport.prototype.bindEvents = function () {
            var _this = this;
            this.parent.treeGrid.beforeExcelExport = function (args) {
                _this.parent.trigger('beforeExcelExport', args);
                if (!ej2_base_1.isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === 'Shimmer') {
                    _this.parent.showMaskRow();
                }
                else {
                    _this.parent.showSpinner();
                }
            };
            this.parent.treeGrid.excelQueryCellInfo = function (args) {
                _this.parent.trigger('excelQueryCellInfo', args);
            };
            this.parent.treeGrid.excelHeaderQueryCellInfo = function (args) {
                _this.parent.trigger('excelHeaderQueryCellInfo', args);
            };
            this.parent.treeGrid.excelExportComplete = function (args) {
                _this.parent.trigger('excelExportComplete', args);
                if (!ej2_base_1.isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === 'Shimmer') {
                    _this.parent.hideMaskRow();
                }
                else {
                    _this.parent.hideSpinner();
                }
            };
        };
        return ExcelExport;
    }());
    exports.ExcelExport = ExcelExport;
});