/*! * 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, ElementRef, NgZone, Input, Output, OnDestroy, Injector, EventEmitter } from '@angular/core'; import DxSlideOutView from 'devextreme/ui/slide_out_view'; import { DxComponent } from '../core/component'; import { DxTemplateHost } from '../core/template-host'; import { DxTemplateModule } from '../core/template'; import { EventsRegistrator } from '../core/events-strategy'; import { NestedOptionHost } from '../core/nested-option'; import { WatcherHelper } from '../core/watcher-helper'; /** * The SlideOutView widget is a classic slide-out menu paired with a view. */ @Component({ selector: 'dx-slide-out-view', template: '', providers: [ DxTemplateHost, WatcherHelper, NestedOptionHost ] }) export class DxSlideOutViewComponent extends DxComponent implements OnDestroy { instance: DxSlideOutView; /** * Specifies whether or not the widget changes its state when interacting with a user. */ @Input() get activeStateEnabled(): boolean { return this._getOption('activeStateEnabled'); } set activeStateEnabled(value: boolean) { this._setOption('activeStateEnabled', value); } /** * A template to be used for rendering widget content. */ @Input() get contentTemplate(): any { return this._getOption('contentTemplate'); } set contentTemplate(value: any) { this._setOption('contentTemplate', value); } /** * Specifies whether the widget responds to user interaction. */ @Input() get disabled(): boolean { return this._getOption('disabled'); } set disabled(value: boolean) { this._setOption('disabled', value); } /** * Specifies the attributes to be attached to the widget's root element. */ @Input() get elementAttr(): any { return this._getOption('elementAttr'); } set elementAttr(value: any) { this._setOption('elementAttr', value); } /** * Specifies the widget's height. */ @Input() get height(): number| Function| string { return this._getOption('height'); } set height(value: number| Function| string) { this._setOption('height', value); } /** * Specifies text for a hint that appears when a user pauses on the widget. */ @Input() get hint(): string { return this._getOption('hint'); } set hint(value: string) { this._setOption('hint', value); } /** * Specifies whether the widget changes its state when a user pauses on it. */ @Input() get hoverStateEnabled(): boolean { return this._getOption('hoverStateEnabled'); } set hoverStateEnabled(value: boolean) { this._setOption('hoverStateEnabled', value); } /** * Specifies the current menu position. */ @Input() get menuPosition(): string { return this._getOption('menuPosition'); } set menuPosition(value: string) { this._setOption('menuPosition', value); } /** * A template to be used for rendering menu panel content. */ @Input() get menuTemplate(): any { return this._getOption('menuTemplate'); } set menuTemplate(value: any) { this._setOption('menuTemplate', value); } /** * Specifies whether or not the menu panel is visible. */ @Input() get menuVisible(): boolean { return this._getOption('menuVisible'); } set menuVisible(value: boolean) { this._setOption('menuVisible', value); } /** * Switches the widget to a right-to-left representation. */ @Input() get rtlEnabled(): boolean { return this._getOption('rtlEnabled'); } set rtlEnabled(value: boolean) { this._setOption('rtlEnabled', value); } /** * Specifies whether or not the menu is shown when a user swipes the widget content. */ @Input() get swipeEnabled(): boolean { return this._getOption('swipeEnabled'); } set swipeEnabled(value: boolean) { this._setOption('swipeEnabled', value); } /** * Specifies whether the widget is visible. */ @Input() get visible(): boolean { return this._getOption('visible'); } set visible(value: boolean) { this._setOption('visible', value); } /** * Specifies the widget's width. */ @Input() get width(): number| Function| string { return this._getOption('width'); } set width(value: number| Function| string) { this._setOption('width', value); } /** * A handler for the disposing event. Executed when the widget is removed from the DOM using the remove(), empty(), or html() jQuery methods only. */ @Output() onDisposing: EventEmitter; /** * A handler for the initialized event. Executed only once, after the widget is initialized. */ @Output() onInitialized: EventEmitter; /** * A handler for the optionChanged event. Executed after an option of the widget is changed. */ @Output() onOptionChanged: EventEmitter; /** * A handler for the activeStateEnabledChange event. */ @Output() activeStateEnabledChange: EventEmitter; /** * A handler for the contentTemplateChange event. */ @Output() contentTemplateChange: EventEmitter; /** * A handler for the disabledChange event. */ @Output() disabledChange: EventEmitter; /** * A handler for the elementAttrChange event. */ @Output() elementAttrChange: EventEmitter; /** * A handler for the heightChange event. */ @Output() heightChange: EventEmitter; /** * A handler for the hintChange event. */ @Output() hintChange: EventEmitter; /** * A handler for the hoverStateEnabledChange event. */ @Output() hoverStateEnabledChange: EventEmitter; /** * A handler for the menuPositionChange event. */ @Output() menuPositionChange: EventEmitter; /** * A handler for the menuTemplateChange event. */ @Output() menuTemplateChange: EventEmitter; /** * A handler for the menuVisibleChange event. */ @Output() menuVisibleChange: EventEmitter; /** * A handler for the rtlEnabledChange event. */ @Output() rtlEnabledChange: EventEmitter; /** * A handler for the swipeEnabledChange event. */ @Output() swipeEnabledChange: EventEmitter; /** * A handler for the visibleChange event. */ @Output() visibleChange: EventEmitter; /** * A handler for the widthChange event. */ @Output() widthChange: EventEmitter; constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, injector: Injector, _watcherHelper: WatcherHelper, optionHost: NestedOptionHost) { super(elementRef, ngZone, templateHost, _watcherHelper); injector.get(EventsRegistrator); this._createEventEmitters([ { subscribe: 'disposing', emit: 'onDisposing' }, { subscribe: 'initialized', emit: 'onInitialized' }, { subscribe: 'optionChanged', emit: 'onOptionChanged' }, { emit: 'activeStateEnabledChange' }, { emit: 'contentTemplateChange' }, { emit: 'disabledChange' }, { emit: 'elementAttrChange' }, { emit: 'heightChange' }, { emit: 'hintChange' }, { emit: 'hoverStateEnabledChange' }, { emit: 'menuPositionChange' }, { emit: 'menuTemplateChange' }, { emit: 'menuVisibleChange' }, { emit: 'rtlEnabledChange' }, { emit: 'swipeEnabledChange' }, { emit: 'visibleChange' }, { emit: 'widthChange' } ]); optionHost.setHost(this); } protected _createInstance(element, options) { return new DxSlideOutView(element, options); } ngOnDestroy() { this._destroyWidget(); } } @NgModule({ imports: [ DxTemplateModule ], declarations: [ DxSlideOutViewComponent ], exports: [ DxSlideOutViewComponent, DxTemplateModule ], providers: [EventsRegistrator] }) export class DxSlideOutViewModule { }