/*! * 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, ContentChildren, forwardRef, QueryList } from '@angular/core'; import DevExpress from 'devextreme/bundles/dx.all'; import { NestedOptionHost } from '../../core/nested-option'; import { NestedOption } from '../../core/nested-option'; import { DxiGroupItemComponent } from './group-item-dxi'; import { DxiTotalItemComponent } from './total-item-dxi'; @Component({ selector: 'dxo-summary', template: '', styles: [''], providers: [NestedOptionHost] }) export class DxoSummaryComponent extends NestedOption { @Input() get calculateCustomSummary(): Function { return this._getOption('calculateCustomSummary'); } set calculateCustomSummary(value: Function) { this._setOption('calculateCustomSummary', value); } @Input() get groupItems(): Array { return this._getOption('groupItems'); } set groupItems(value: Array) { this._setOption('groupItems', value); } @Input() get skipEmptyValues(): boolean { return this._getOption('skipEmptyValues'); } set skipEmptyValues(value: boolean) { this._setOption('skipEmptyValues', value); } @Input() get texts(): any { return this._getOption('texts'); } set texts(value: any) { this._setOption('texts', value); } @Input() get totalItems(): Array { return this._getOption('totalItems'); } set totalItems(value: Array) { this._setOption('totalItems', value); } protected get _optionPath() { return 'summary'; } @ContentChildren(forwardRef(() => DxiGroupItemComponent)) get groupItemsChildren(): QueryList { return this._getOption('groupItems'); } set groupItemsChildren(value) { this.setChildren('groupItems', value); } @ContentChildren(forwardRef(() => DxiTotalItemComponent)) get totalItemsChildren(): QueryList { return this._getOption('totalItems'); } set totalItemsChildren(value) { this.setChildren('totalItems', value); } constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, @Host() optionHost: NestedOptionHost) { super(); parentOptionHost.setNestedOption(this); optionHost.setHost(this, this._fullOptionPath.bind(this)); } } @NgModule({ declarations: [ DxoSummaryComponent ], exports: [ DxoSummaryComponent ], }) export class DxoSummaryModule { }