/*! * devextreme-angular-test * Version: 17.2.8 * Build date: Mon Feb 05 2018 * * Copyright (c) 2012 - 2018 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-angular */ import { Component, NgModule, Host, ElementRef, AfterViewInit, SkipSelf, Input } from '@angular/core'; import { NestedOptionHost, extractTemplate } from '../../core/nested-option'; import { DxTemplateDirective } from '../../core/template'; import { IDxTemplateHost, DxTemplateHost } from '../../core/template-host'; import { NestedOption } from '../../core/nested-option'; @Component({ selector: 'dxo-master-detail', template: '', styles: [':host { display: block; }'], providers: [NestedOptionHost, DxTemplateHost] }) export class DxoMasterDetailComponent extends NestedOption implements AfterViewInit, IDxTemplateHost { @Input() get autoExpandAll(): boolean { return this._getOption('autoExpandAll'); } set autoExpandAll(value: boolean) { this._setOption('autoExpandAll', value); } @Input() get enabled(): boolean { return this._getOption('enabled'); } set enabled(value: boolean) { this._setOption('enabled', value); } @Input() get template(): any { return this._getOption('template'); } set template(value: any) { this._setOption('template', value); } protected get _optionPath() { return 'masterDetail'; } constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, @Host() optionHost: NestedOptionHost, @Host() templateHost: DxTemplateHost, private element: ElementRef) { super(); parentOptionHost.setNestedOption(this); optionHost.setHost(this, this._fullOptionPath.bind(this)); templateHost.setHost(this); } setTemplate(template: DxTemplateDirective) { this.template = template; } ngAfterViewInit() { extractTemplate(this, this.element); } } @NgModule({ declarations: [ DxoMasterDetailComponent ], exports: [ DxoMasterDetailComponent ], }) export class DxoMasterDetailModule { }