1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = Object.setPrototypeOf ||
|
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6 | return function (d, b) {
|
7 | extendStatics(d, b);
|
8 | function __() { this.constructor = d; }
|
9 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
10 | };
|
11 | })();
|
12 | Object.defineProperty(exports, "__esModule", { value: true });
|
13 | var core_1 = require("@angular/core");
|
14 | var abstract_ngmodel_1 = require("../../models/abstract.ngmodel");
|
15 | var TreeviewComponent = (function (_super) {
|
16 | __extends(TreeviewComponent, _super);
|
17 | function TreeviewComponent() {
|
18 | var _this = _super !== null && _super.apply(this, arguments) || this;
|
19 | _this.id = '';
|
20 | _this.securityId = '';
|
21 | _this.dataSource = [];
|
22 | _this.onClick = new core_1.EventEmitter();
|
23 | return _this;
|
24 | }
|
25 | TreeviewComponent.prototype.ngOnInit = function () {
|
26 | _super.prototype.validar.call(this, this.securityId);
|
27 | };
|
28 | TreeviewComponent.prototype.itemClicado = function (event) {
|
29 | if (!event.itemData.items) {
|
30 | this.onClick.emit(event.itemData);
|
31 | }
|
32 | };
|
33 | return TreeviewComponent;
|
34 | }(abstract_ngmodel_1.AbstractNgModel));
|
35 | TreeviewComponent.decorators = [
|
36 | { type: core_1.Component, args: [{
|
37 | selector: 'sbm-treeview',
|
38 |
|
39 |
|
40 | template: "\n <dx-tree-view [dataSource]=\"dataSource\" dataStructure=\"plain\"\n (onItemClick)='itemClicado($event)' [visible]='exibirComponente'></dx-tree-view>\n "
|
41 | },] },
|
42 | ];
|
43 |
|
44 | TreeviewComponent.ctorParameters = function () { return []; };
|
45 | TreeviewComponent.propDecorators = {
|
46 | 'id': [{ type: core_1.Input },],
|
47 | 'securityId': [{ type: core_1.Input },],
|
48 | 'dataSource': [{ type: core_1.Input },],
|
49 | 'onClick': [{ type: core_1.Output },],
|
50 | };
|
51 | exports.TreeviewComponent = TreeviewComponent;
|