/*! * 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, SkipSelf, Input } from '@angular/core'; import DevExpress from 'devextreme/bundles/dx.all'; import { NestedOptionHost } from '../../core/nested-option'; import { CollectionNestedOption } from '../../core/nested-option'; @Component({ selector: 'dxi-resource', template: '', styles: [''], providers: [NestedOptionHost] }) export class DxiResourceComponent extends CollectionNestedOption { @Input() get allowMultiple(): boolean { return this._getOption('allowMultiple'); } set allowMultiple(value: boolean) { this._setOption('allowMultiple', value); } @Input() get colorExpr(): string { return this._getOption('colorExpr'); } set colorExpr(value: string) { this._setOption('colorExpr', value); } @Input() get dataSource(): DevExpress.data.DataSource| DevExpress.data.DataSourceOptions| string| Array { return this._getOption('dataSource'); } set dataSource(value: DevExpress.data.DataSource| DevExpress.data.DataSourceOptions| string| Array) { this._setOption('dataSource', value); } @Input() get displayExpr(): Function| string { return this._getOption('displayExpr'); } set displayExpr(value: Function| string) { this._setOption('displayExpr', value); } @Input() get field(): string { return this._getOption('field'); } set field(value: string) { this._setOption('field', value); } @Input() get fieldExpr(): string { return this._getOption('fieldExpr'); } set fieldExpr(value: string) { this._setOption('fieldExpr', value); } @Input() get label(): string { return this._getOption('label'); } set label(value: string) { this._setOption('label', value); } @Input() get mainColor(): boolean { return this._getOption('mainColor'); } set mainColor(value: boolean) { this._setOption('mainColor', value); } @Input() get useColorAsDefault(): boolean { return this._getOption('useColorAsDefault'); } set useColorAsDefault(value: boolean) { this._setOption('useColorAsDefault', value); } @Input() get valueExpr(): Function| string { return this._getOption('valueExpr'); } set valueExpr(value: Function| string) { this._setOption('valueExpr', value); } protected get _optionPath() { return 'resources'; } constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, @Host() optionHost: NestedOptionHost) { super(); parentOptionHost.setNestedOption(this); optionHost.setHost(this, this._fullOptionPath.bind(this)); } } @NgModule({ declarations: [ DxiResourceComponent ], exports: [ DxiResourceComponent ], }) export class DxiResourceModule { }