"use strict";
var __extends = (this && this.__extends) || (function () {
    var 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 function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
var wjcGrid = require("wijmo/wijmo.grid");
var wjcCore = require("wijmo/wijmo");
'use strict';
var core_1 = require("@angular/core");
var common_1 = require("@angular/common");
var router_1 = require("@angular/router");
var GridBaseCmp_1 = require("./GridBaseCmp");
var DataSvc_1 = require("../../services/DataSvc");
var wijmo_angular2_grid_1 = require("wijmo/wijmo.angular2.grid");
var wijmo_angular2_input_1 = require("wijmo/wijmo.angular2.input");
// FlexGrid No Dctv component.
var GridNoDctvCmp = /** @class */ (function (_super) {
    __extends(GridNoDctvCmp, _super);
    function GridNoDctvCmp(dataSvc) {
        return _super.call(this, dataSvc) || this;
    }
    GridNoDctvCmp.prototype.ngAfterViewInit = function () {
        if (!this.flex) {
            // create flex using a jQuery id selector
            this.flex = new wjcGrid.FlexGrid('#flexNoDctv');
            // create flex using an element (same thing really)
            //var e = $('#flexNoDctv')[0];
            //flex = new wijmo.grid.FlexGrid(e);
            // populate the grid with the grid's own properties
            var data = [];
            for (var prop in this.flex) {
                if (prop.indexOf('_') != 0) {
                    var val = this.flex[prop];
                    var type = val instanceof wjcCore.Event ? 'Event'
                        : val instanceof wjcGrid.CellRange ? 'CellRange'
                            : val instanceof wjcCore.Point ? 'Point'
                                : val instanceof wjcCore.Size ? 'Size'
                                    : val instanceof wjcCore.ObservableArray ? 'ObservableArray'
                                        : typeof (val);
                    if (!wjcCore.isFunction(val)) {
                        data.push({
                            name: prop,
                            type: type,
                            value: val ? val.toString() : ''
                        });
                    }
                }
            }
            this.flex.itemsSource = data;
            this.flex.autoSizeColumns();
        }
    };
    GridNoDctvCmp = __decorate([
        core_1.Component({
            selector: 'grid-no-dctv-cmp',
            templateUrl: 'src/components/grid/gridNoDctvCmp.html'
        }),
        __param(0, core_1.Inject(DataSvc_1.DataSvc))
    ], GridNoDctvCmp);
    return GridNoDctvCmp;
}(GridBaseCmp_1.GridBaseCmp));
exports.GridNoDctvCmp = GridNoDctvCmp;
var routing = router_1.RouterModule.forChild([
    { path: '', component: GridNoDctvCmp }
]);
var GridNoDctvModule = /** @class */ (function () {
    function GridNoDctvModule() {
    }
    GridNoDctvModule = __decorate([
        core_1.NgModule({
            imports: [common_1.CommonModule, routing, wijmo_angular2_grid_1.WjGridModule, wijmo_angular2_input_1.WjInputModule],
            declarations: [GridNoDctvCmp],
        })
    ], GridNoDctvModule);
    return GridNoDctvModule;
}());
exports.GridNoDctvModule = GridNoDctvModule;
//# sourceMappingURL=GridNoDctvCmp.js.map