UNPKG

ng2-bootstrap

Version:
61 lines (60 loc) 2.33 kB
"use strict"; var core_1 = require('@angular/core'); var modal_options_class_1 = require('./modal-options.class'); var ng2_bootstrap_config_1 = require('../utils/ng2-bootstrap-config'); var ModalBackdropOptions = (function () { function ModalBackdropOptions(options) { this.animate = true; Object.assign(this, options); } return ModalBackdropOptions; }()); exports.ModalBackdropOptions = ModalBackdropOptions; /** This component will be added as background layout for modals if enabled */ var ModalBackdropComponent = (function () { function ModalBackdropComponent(element, renderer) { this._isShown = false; this.element = element; this.renderer = renderer; } Object.defineProperty(ModalBackdropComponent.prototype, "isAnimated", { get: function () { return this._isAnimated; }, set: function (value) { this._isAnimated = value; this.renderer.setElementClass(this.element.nativeElement, "" + modal_options_class_1.ClassName.FADE, value); }, enumerable: true, configurable: true }); Object.defineProperty(ModalBackdropComponent.prototype, "isShown", { get: function () { return this._isShown; }, set: function (value) { this._isShown = value; this.renderer.setElementClass(this.element.nativeElement, "" + modal_options_class_1.ClassName.IN, value); if (!ng2_bootstrap_config_1.isBs3()) { this.renderer.setElementClass(this.element.nativeElement, "" + modal_options_class_1.ClassName.SHOW, value); } }, enumerable: true, configurable: true }); ModalBackdropComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'bs-modal-backdrop', template: '', // tslint:disable-next-line host: { 'class': modal_options_class_1.ClassName.BACKDROP } },] }, ]; /** @nocollapse */ ModalBackdropComponent.ctorParameters = function () { return [ { type: core_1.ElementRef, }, { type: core_1.Renderer, }, ]; }; return ModalBackdropComponent; }()); exports.ModalBackdropComponent = ModalBackdropComponent;