"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); /*! * devextreme-angular * Version: 19.1.16 * Build date: Tue Oct 18 2022 * * Copyright (c) 2012 - 2022 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 */ Object.defineProperty(exports, "__esModule", { value: true }); var platform_browser_1 = require("@angular/platform-browser"); var platform_browser_2 = require("@angular/platform-browser"); var core_1 = require("@angular/core"); var defer_rendering_1 = require("devextreme/ui/defer_rendering"); var component_1 = require("../core/component"); var template_host_1 = require("../core/template-host"); var integration_1 = require("../core/integration"); var template_1 = require("../core/template"); var nested_option_1 = require("../core/nested-option"); var watcher_helper_1 = require("../core/watcher-helper"); var animation_1 = require("./nested/animation"); /** * The DeferRendering is a widget that waits for its content to be ready before rendering it. While the content is getting ready, the DeferRendering displays a loading indicator. */ var DxDeferRenderingComponent = (function (_super) { __extends(DxDeferRenderingComponent, _super); function DxDeferRenderingComponent(elementRef, ngZone, templateHost, _watcherHelper, optionHost, transferState, platformId) { var _this = _super.call(this, elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId) || this; _this._createEventEmitters([ { subscribe: 'contentReady', emit: 'onContentReady' }, { subscribe: 'disposing', emit: 'onDisposing' }, { subscribe: 'initialized', emit: 'onInitialized' }, { subscribe: 'optionChanged', emit: 'onOptionChanged' }, { subscribe: 'rendered', emit: 'onRendered' }, { subscribe: 'shown', emit: 'onShown' }, { emit: 'accessKeyChange' }, { emit: 'activeStateEnabledChange' }, { emit: 'animationChange' }, { emit: 'disabledChange' }, { emit: 'elementAttrChange' }, { emit: 'focusStateEnabledChange' }, { emit: 'heightChange' }, { emit: 'hintChange' }, { emit: 'hoverStateEnabledChange' }, { emit: 'renderWhenChange' }, { emit: 'rtlEnabledChange' }, { emit: 'showLoadIndicatorChange' }, { emit: 'staggerItemSelectorChange' }, { emit: 'tabIndexChange' }, { emit: 'visibleChange' }, { emit: 'widthChange' } ]); optionHost.setHost(_this); return _this; } Object.defineProperty(DxDeferRenderingComponent.prototype, "accessKey", { get: /** * Specifies the shortcut key that sets focus on the widget. */ function () { return this._getOption('accessKey'); }, set: function (value) { this._setOption('accessKey', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "activeStateEnabled", { get: /** * Specifies whether or not the widget changes its state when interacting with a user. */ function () { return this._getOption('activeStateEnabled'); }, set: function (value) { this._setOption('activeStateEnabled', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "animation", { get: /** * Specifies the animation to be used to show the rendered content. */ function () { return this._getOption('animation'); }, set: function (value) { this._setOption('animation', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "disabled", { get: /** * Specifies whether the widget responds to user interaction. */ function () { return this._getOption('disabled'); }, set: function (value) { this._setOption('disabled', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "elementAttr", { get: /** * Specifies the attributes to be attached to the widget's root element. */ function () { return this._getOption('elementAttr'); }, set: function (value) { this._setOption('elementAttr', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "focusStateEnabled", { get: /** * Specifies whether the widget can be focused using keyboard navigation. */ function () { return this._getOption('focusStateEnabled'); }, set: function (value) { this._setOption('focusStateEnabled', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "height", { get: /** * Specifies the widget's height. */ function () { return this._getOption('height'); }, set: function (value) { this._setOption('height', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "hint", { get: /** * Specifies text for a hint that appears when a user pauses on the widget. */ function () { return this._getOption('hint'); }, set: function (value) { this._setOption('hint', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "hoverStateEnabled", { get: /** * Specifies whether the widget changes its state when a user pauses on it. */ function () { return this._getOption('hoverStateEnabled'); }, set: function (value) { this._setOption('hoverStateEnabled', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "renderWhen", { get: /** * Specifies when the widget content is rendered. */ function () { return this._getOption('renderWhen'); }, set: function (value) { this._setOption('renderWhen', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "rtlEnabled", { get: /** * Switches the widget to a right-to-left representation. */ function () { return this._getOption('rtlEnabled'); }, set: function (value) { this._setOption('rtlEnabled', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "showLoadIndicator", { get: /** * Indicates if a load indicator should be shown until the widget's content is rendered. */ function () { return this._getOption('showLoadIndicator'); }, set: function (value) { this._setOption('showLoadIndicator', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "staggerItemSelector", { get: /** * Specifies a jQuery selector of items that should be rendered using a staggered animation. */ function () { return this._getOption('staggerItemSelector'); }, set: function (value) { this._setOption('staggerItemSelector', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "tabIndex", { get: /** * Specifies the number of the element when the Tab key is used for navigating. */ function () { return this._getOption('tabIndex'); }, set: function (value) { this._setOption('tabIndex', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "visible", { get: /** * Specifies whether the widget is visible. */ function () { return this._getOption('visible'); }, set: function (value) { this._setOption('visible', value); }, enumerable: true, configurable: true }); Object.defineProperty(DxDeferRenderingComponent.prototype, "width", { get: /** * Specifies the widget's width. */ function () { return this._getOption('width'); }, set: function (value) { this._setOption('width', value); }, enumerable: true, configurable: true }); DxDeferRenderingComponent.prototype._createInstance = function (element, options) { return new defer_rendering_1.default(element, options); }; DxDeferRenderingComponent.prototype.ngOnDestroy = function () { this._destroyWidget(); }; DxDeferRenderingComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'dx-defer-rendering', template: '', providers: [ template_host_1.DxTemplateHost, watcher_helper_1.WatcherHelper, nested_option_1.NestedOptionHost ] },] }, ]; /** @nocollapse */ DxDeferRenderingComponent.ctorParameters = function () { return [ { type: core_1.ElementRef, }, { type: core_1.NgZone, }, { type: template_host_1.DxTemplateHost, }, { type: watcher_helper_1.WatcherHelper, }, { type: nested_option_1.NestedOptionHost, }, { type: platform_browser_2.TransferState, }, { type: undefined, decorators: [{ type: core_1.Inject, args: [core_1.PLATFORM_ID,] },] }, ]; }; DxDeferRenderingComponent.propDecorators = { "accessKey": [{ type: core_1.Input },], "activeStateEnabled": [{ type: core_1.Input },], "animation": [{ type: core_1.Input },], "disabled": [{ type: core_1.Input },], "elementAttr": [{ type: core_1.Input },], "focusStateEnabled": [{ type: core_1.Input },], "height": [{ type: core_1.Input },], "hint": [{ type: core_1.Input },], "hoverStateEnabled": [{ type: core_1.Input },], "renderWhen": [{ type: core_1.Input },], "rtlEnabled": [{ type: core_1.Input },], "showLoadIndicator": [{ type: core_1.Input },], "staggerItemSelector": [{ type: core_1.Input },], "tabIndex": [{ type: core_1.Input },], "visible": [{ type: core_1.Input },], "width": [{ type: core_1.Input },], "onContentReady": [{ type: core_1.Output },], "onDisposing": [{ type: core_1.Output },], "onInitialized": [{ type: core_1.Output },], "onOptionChanged": [{ type: core_1.Output },], "onRendered": [{ type: core_1.Output },], "onShown": [{ type: core_1.Output },], "accessKeyChange": [{ type: core_1.Output },], "activeStateEnabledChange": [{ type: core_1.Output },], "animationChange": [{ type: core_1.Output },], "disabledChange": [{ type: core_1.Output },], "elementAttrChange": [{ type: core_1.Output },], "focusStateEnabledChange": [{ type: core_1.Output },], "heightChange": [{ type: core_1.Output },], "hintChange": [{ type: core_1.Output },], "hoverStateEnabledChange": [{ type: core_1.Output },], "renderWhenChange": [{ type: core_1.Output },], "rtlEnabledChange": [{ type: core_1.Output },], "showLoadIndicatorChange": [{ type: core_1.Output },], "staggerItemSelectorChange": [{ type: core_1.Output },], "tabIndexChange": [{ type: core_1.Output },], "visibleChange": [{ type: core_1.Output },], "widthChange": [{ type: core_1.Output },], }; return DxDeferRenderingComponent; }(component_1.DxComponent)); exports.DxDeferRenderingComponent = DxDeferRenderingComponent; var DxDeferRenderingModule = (function () { function DxDeferRenderingModule() { } DxDeferRenderingModule.decorators = [ { type: core_1.NgModule, args: [{ imports: [ animation_1.DxoAnimationModule, integration_1.DxIntegrationModule, template_1.DxTemplateModule, platform_browser_1.BrowserTransferStateModule ], declarations: [ DxDeferRenderingComponent ], exports: [ DxDeferRenderingComponent, animation_1.DxoAnimationModule, template_1.DxTemplateModule ] },] }, ]; return DxDeferRenderingModule; }()); exports.DxDeferRenderingModule = DxDeferRenderingModule; //# sourceMappingURL=defer-rendering.js.map