UNPKG

2.02 kBJavaScriptView Raw
1import { Component, HostListener, HostBinding, ViewEncapsulation, EventEmitter } from '@angular/core';
2export var MdlBackdropOverlayComponent = (function () {
3 function MdlBackdropOverlayComponent() {
4 this.clickEmitter = new EventEmitter();
5 this.visible = false;
6 this.zIndex = 0;
7 }
8 Object.defineProperty(MdlBackdropOverlayComponent.prototype, "display", {
9 get: function () {
10 return this.visible ? null : 'none';
11 },
12 enumerable: true,
13 configurable: true
14 });
15 MdlBackdropOverlayComponent.prototype.onBackdropClick = function (e) {
16 this.clickEmitter.emit();
17 e.stopPropagation();
18 };
19 MdlBackdropOverlayComponent.prototype.hide = function () {
20 this.visible = false;
21 };
22 MdlBackdropOverlayComponent.prototype.showWithZIndex = function (zIndex) {
23 this.zIndex = zIndex;
24 this.visible = true;
25 };
26 MdlBackdropOverlayComponent.decorators = [
27 { type: Component, args: [{
28 selector: 'mdl-backdrop-overlay',
29 host: {
30 '[class.dialog-backdrop]': 'true',
31 },
32 template: "",
33 styles: [
34 " \n .dialog-backdrop {\n position: fixed;\n top: 0; right: 0; bottom: 0; left: 0;\n background: rgba(0,0,0,0.1);\n }\n "
35 ],
36 encapsulation: ViewEncapsulation.None
37 },] },
38 ];
39 /** @nocollapse */
40 MdlBackdropOverlayComponent.ctorParameters = function () { return []; };
41 MdlBackdropOverlayComponent.propDecorators = {
42 'display': [{ type: HostBinding, args: ['style.display',] },],
43 'zIndex': [{ type: HostBinding, args: ['style.zIndex',] },],
44 'onBackdropClick': [{ type: HostListener, args: ['click', ['$event'],] },],
45 };
46 return MdlBackdropOverlayComponent;
47}());
48//# sourceMappingURL=mdl-backdrop-overlay.component.js.map
\No newline at end of file