/*! * 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 DevExpress from 'devextreme/bundles/dx.all'; import DxLoadPanel from 'devextreme/ui/load_panel'; 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'; import { DxoAnimationModule } from './nested/animation'; import { DxoHideModule } from './nested/hide'; import { DxoShowModule } from './nested/show'; import { DxoPositionModule } from './nested/position'; import { DxoAtModule } from './nested/at'; import { DxoBoundaryOffsetModule } from './nested/boundary-offset'; import { DxoCollisionModule } from './nested/collision'; import { DxoMyModule } from './nested/my'; import { DxoOffsetModule } from './nested/offset'; /** * The LoadPanel is an overlay widget notifying the viewer that loading is in progress. */ @Component({ selector: 'dx-load-panel', template: '', providers: [ DxTemplateHost, WatcherHelper, NestedOptionHost ] }) export class DxLoadPanelComponent extends DxComponent implements OnDestroy { instance: DxLoadPanel; /** * Configures widget visibility animations. This object contains two fields: show and hide. */ @Input() get animation(): any { return this._getOption('animation'); } set animation(value: any) { this._setOption('animation', value); } /** * A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ @Input() get closeOnOutsideClick(): boolean| Function { return this._getOption('closeOnOutsideClick'); } set closeOnOutsideClick(value: boolean| Function) { this._setOption('closeOnOutsideClick', value); } /** * Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ @Input() get deferRendering(): boolean { return this._getOption('deferRendering'); } set deferRendering(value: boolean) { this._setOption('deferRendering', value); } /** * The delay in milliseconds after which the load panel is displayed. */ @Input() get delay(): number { return this._getOption('delay'); } set delay(value: number) { this._setOption('delay', 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 whether or not the widget can be focused. */ @Input() get focusStateEnabled(): boolean { return this._getOption('focusStateEnabled'); } set focusStateEnabled(value: boolean) { this._setOption('focusStateEnabled', value); } /** * The height of the widget. */ @Input() get height(): number { return this._getOption('height'); } set height(value: number) { 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); } /** * A URL pointing to an image to be used as a load indicator. */ @Input() get indicatorSrc(): string { return this._getOption('indicatorSrc'); } set indicatorSrc(value: string) { this._setOption('indicatorSrc', value); } /** * Specifies the maximum height the widget can reach while resizing. */ @Input() get maxHeight(): number| Function| string { return this._getOption('maxHeight'); } set maxHeight(value: number| Function| string) { this._setOption('maxHeight', value); } /** * Specifies the maximum width the widget can reach while resizing. */ @Input() get maxWidth(): number| Function| string { return this._getOption('maxWidth'); } set maxWidth(value: number| Function| string) { this._setOption('maxWidth', value); } /** * The text displayed in the load panel. */ @Input() get message(): string { return this._getOption('message'); } set message(value: string) { this._setOption('message', value); } /** * Specifies the minimum height the widget can reach while resizing. */ @Input() get minHeight(): number| Function| string { return this._getOption('minHeight'); } set minHeight(value: number| Function| string) { this._setOption('minHeight', value); } /** * Specifies the minimum width the widget can reach while resizing. */ @Input() get minWidth(): number| Function| string { return this._getOption('minWidth'); } set minWidth(value: number| Function| string) { this._setOption('minWidth', value); } /** * An object defining widget positioning options. */ @Input() get position(): DevExpress.positionConfig { return this._getOption('position'); } set position(value: DevExpress.positionConfig) { this._setOption('position', 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); } /** * A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ @Input() get shading(): boolean { return this._getOption('shading'); } set shading(value: boolean) { this._setOption('shading', value); } /** * Specifies the shading color. */ @Input() get shadingColor(): string { return this._getOption('shadingColor'); } set shadingColor(value: string) { this._setOption('shadingColor', value); } /** * A Boolean value specifying whether or not to show a load indicator. */ @Input() get showIndicator(): boolean { return this._getOption('showIndicator'); } set showIndicator(value: boolean) { this._setOption('showIndicator', value); } /** * A Boolean value specifying whether or not to show the pane behind the load indicator. */ @Input() get showPane(): boolean { return this._getOption('showPane'); } set showPane(value: boolean) { this._setOption('showPane', value); } /** * A Boolean value specifying whether or not 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 { return this._getOption('width'); } set width(value: number) { this._setOption('width', value); } /** * A handler for the contentReady event. Executed when the widget's content is ready. This handler may be executed multiple times during the widget's lifetime depending on the number of times its content changes. */ @Output() onContentReady: EventEmitter; /** * 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 hidden event. */ @Output() onHidden: EventEmitter; /** * A handler for the hiding event. */ @Output() onHiding: 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 showing event. */ @Output() onShowing: EventEmitter; /** * A handler for the shown event. */ @Output() onShown: EventEmitter; /** * A handler for the animationChange event. */ @Output() animationChange: EventEmitter; /** * A handler for the closeOnOutsideClickChange event. */ @Output() closeOnOutsideClickChange: EventEmitter; /** * A handler for the deferRenderingChange event. */ @Output() deferRenderingChange: EventEmitter; /** * A handler for the delayChange event. */ @Output() delayChange: EventEmitter; /** * A handler for the elementAttrChange event. */ @Output() elementAttrChange: EventEmitter; /** * A handler for the focusStateEnabledChange event. */ @Output() focusStateEnabledChange: 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 indicatorSrcChange event. */ @Output() indicatorSrcChange: EventEmitter; /** * A handler for the maxHeightChange event. */ @Output() maxHeightChange: EventEmitter; /** * A handler for the maxWidthChange event. */ @Output() maxWidthChange: EventEmitter; /** * A handler for the messageChange event. */ @Output() messageChange: EventEmitter; /** * A handler for the minHeightChange event. */ @Output() minHeightChange: EventEmitter; /** * A handler for the minWidthChange event. */ @Output() minWidthChange: EventEmitter; /** * A handler for the positionChange event. */ @Output() positionChange: EventEmitter; /** * A handler for the rtlEnabledChange event. */ @Output() rtlEnabledChange: EventEmitter; /** * A handler for the shadingChange event. */ @Output() shadingChange: EventEmitter; /** * A handler for the shadingColorChange event. */ @Output() shadingColorChange: EventEmitter; /** * A handler for the showIndicatorChange event. */ @Output() showIndicatorChange: EventEmitter; /** * A handler for the showPaneChange event. */ @Output() showPaneChange: 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: 'contentReady', emit: 'onContentReady' }, { subscribe: 'disposing', emit: 'onDisposing' }, { subscribe: 'hidden', emit: 'onHidden' }, { subscribe: 'hiding', emit: 'onHiding' }, { subscribe: 'initialized', emit: 'onInitialized' }, { subscribe: 'optionChanged', emit: 'onOptionChanged' }, { subscribe: 'showing', emit: 'onShowing' }, { subscribe: 'shown', emit: 'onShown' }, { emit: 'animationChange' }, { emit: 'closeOnOutsideClickChange' }, { emit: 'deferRenderingChange' }, { emit: 'delayChange' }, { emit: 'elementAttrChange' }, { emit: 'focusStateEnabledChange' }, { emit: 'heightChange' }, { emit: 'hintChange' }, { emit: 'hoverStateEnabledChange' }, { emit: 'indicatorSrcChange' }, { emit: 'maxHeightChange' }, { emit: 'maxWidthChange' }, { emit: 'messageChange' }, { emit: 'minHeightChange' }, { emit: 'minWidthChange' }, { emit: 'positionChange' }, { emit: 'rtlEnabledChange' }, { emit: 'shadingChange' }, { emit: 'shadingColorChange' }, { emit: 'showIndicatorChange' }, { emit: 'showPaneChange' }, { emit: 'visibleChange' }, { emit: 'widthChange' } ]); optionHost.setHost(this); } protected _createInstance(element, options) { return new DxLoadPanel(element, options); } ngOnDestroy() { this._destroyWidget(); } } @NgModule({ imports: [ DxoAnimationModule, DxoHideModule, DxoShowModule, DxoPositionModule, DxoAtModule, DxoBoundaryOffsetModule, DxoCollisionModule, DxoMyModule, DxoOffsetModule, DxTemplateModule ], declarations: [ DxLoadPanelComponent ], exports: [ DxLoadPanelComponent, DxoAnimationModule, DxoHideModule, DxoShowModule, DxoPositionModule, DxoAtModule, DxoBoundaryOffsetModule, DxoCollisionModule, DxoMyModule, DxoOffsetModule, DxTemplateModule ], providers: [EventsRegistrator] }) export class DxLoadPanelModule { }