text: "use strict";
  /*!
   * devextreme-angular
   * Version: 17.2.6
   * Build date: Mon Mar 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
   */
  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 __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  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 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) {
          var _this = _super.call(this, elementRef, ngZone, templateHost, _watcherHelper) || 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", {
          /**
           * Specifies the shortcut key that sets focus on the widget.
           */
          get: function () {
              return this._getOption('accessKey');
          },
          set: function (value) {
              this._setOption('accessKey', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "activeStateEnabled", {
          /**
           * Specifies whether or not the widget changes its state when interacting with a user.
           */
          get: function () {
              return this._getOption('activeStateEnabled');
          },
          set: function (value) {
              this._setOption('activeStateEnabled', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "animation", {
          /**
           * Specifies the animation to be used to show the rendered content.
           */
          get: function () {
              return this._getOption('animation');
          },
          set: function (value) {
              this._setOption('animation', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "disabled", {
          /**
           * Specifies whether the widget responds to user interaction.
           */
          get: function () {
              return this._getOption('disabled');
          },
          set: function (value) {
              this._setOption('disabled', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "elementAttr", {
          /**
           * Specifies the attributes to be attached to the widget's root element.
           */
          get: function () {
              return this._getOption('elementAttr');
          },
          set: function (value) {
              this._setOption('elementAttr', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "focusStateEnabled", {
          /**
           * Specifies whether the widget can be focused using keyboard navigation.
           */
          get: function () {
              return this._getOption('focusStateEnabled');
          },
          set: function (value) {
              this._setOption('focusStateEnabled', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "height", {
          /**
           * Specifies the widget's height.
           */
          get: function () {
              return this._getOption('height');
          },
          set: function (value) {
              this._setOption('height', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "hint", {
          /**
           * Specifies text for a hint that appears when a user pauses on the widget.
           */
          get: function () {
              return this._getOption('hint');
          },
          set: function (value) {
              this._setOption('hint', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "hoverStateEnabled", {
          /**
           * Specifies whether the widget changes its state when a user pauses on it.
           */
          get: function () {
              return this._getOption('hoverStateEnabled');
          },
          set: function (value) {
              this._setOption('hoverStateEnabled', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "renderWhen", {
          /**
           * Specifies when the widget content is rendered.
           */
          get: function () {
              return this._getOption('renderWhen');
          },
          set: function (value) {
              this._setOption('renderWhen', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "rtlEnabled", {
          /**
           * Switches the widget to a right-to-left representation.
           */
          get: function () {
              return this._getOption('rtlEnabled');
          },
          set: function (value) {
              this._setOption('rtlEnabled', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "showLoadIndicator", {
          /**
           * Indicates if a load indicator should be shown until the widget's content is rendered.
           */
          get: function () {
              return this._getOption('showLoadIndicator');
          },
          set: function (value) {
              this._setOption('showLoadIndicator', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "staggerItemSelector", {
          /**
           * Specifies a jQuery selector of items that should be rendered using a staggered animation.
           */
          get: function () {
              return this._getOption('staggerItemSelector');
          },
          set: function (value) {
              this._setOption('staggerItemSelector', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "tabIndex", {
          /**
           * Specifies the number of the element when the Tab key is used for navigating.
           */
          get: function () {
              return this._getOption('tabIndex');
          },
          set: function (value) {
              this._setOption('tabIndex', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "visible", {
          /**
           * Specifies whether the widget is visible.
           */
          get: function () {
              return this._getOption('visible');
          },
          set: function (value) {
              this._setOption('visible', value);
          },
          enumerable: true,
          configurable: true
      });
      Object.defineProperty(DxDeferRenderingComponent.prototype, "width", {
          /**
           * Specifies the widget's width.
           */
          get: 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, },
      ]; };
      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,
                          template_1.DxTemplateModule
                      ],
                      declarations: [
                          DxDeferRenderingComponent
                      ],
                      exports: [
                          DxDeferRenderingComponent,
                          animation_1.DxoAnimationModule,
                          template_1.DxTemplateModule
                      ],
                  },] },
      ];
      /** @nocollapse */
      DxDeferRenderingModule.ctorParameters = function () { return []; };
      return DxDeferRenderingModule;
  }());
  exports.DxDeferRenderingModule = DxDeferRenderingModule;
  //# sourceMappingURL=defer-rendering.js.map