function MatDialog(_overlay, _injector, _location, _defaultOptions, _scrollStrategy, _parentDialog, _overlayContainer) { var _this = this; this._overlay = _overlay; this._injector = _injector; this._location = _location; this._defaultOptions = _defaultOptions; this._scrollStrategy = _scrollStrategy; this._parentDialog = _parentDialog; this._overlayContainer = _overlayContainer; this._openDialogsAtThisLevel = []; this._afterAllClosedAtThisLevel = new Subject(); this._afterOpenAtThisLevel = new Subject(); this._ariaHiddenElements = new Map(); /** * Stream that emits when all open dialog have finished closing. * Will emit on subscribe if there are no open dialogs to begin with. */ this.afterAllClosed = defer(function () { return _this.openDialogs.length ? _this._afterAllClosed : _this._afterAllClosed.pipe(startWith(undefined)); }); }
/** * @param {?} _overlay * @param {?} _injector * @param {?} location * @param {?} _scrollStrategy * @param {?} _parentDialog */ function MatDialog(_overlay, _injector, location, _scrollStrategy, _parentDialog) { var _this = this; this._overlay = _overlay; this._injector = _injector; this._scrollStrategy = _scrollStrategy; this._parentDialog = _parentDialog; this._openDialogsAtThisLevel = []; this._afterAllClosedAtThisLevel = new Subject(); this._afterOpenAtThisLevel = new Subject(); this._boundKeydown = this._handleKeydown.bind(this); /** * Stream that emits when all open dialog have finished closing. * Will emit on subscribe if there are no open dialogs to begin with. */ this.afterAllClosed = defer(function () { return _this.openDialogs.length ? _this._afterAllClosed : startWith.call(_this._afterAllClosed, undefined); }); // Close all of the dialogs when the user goes forwards/backwards in history or when the // location hash changes. Note that this usually doesn't include clicking on links (unless // the user is using the `HashLocationStrategy`). if (!_parentDialog && location) { location.subscribe(function () { return _this.closeAll(); }); } }