blob: 3b0fffa46217881a4b7565f718493348dcb9eb35 [file] [log] [blame]
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk/bidi",["exports","@angular/common","@angular/core"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.bidi={}),e.ng.common,e.ng.core)}(this,function(e,t,r){"use strict";function n(){return r.inject(t.DOCUMENT)}var i=new r.InjectionToken("cdk-dir-doc",{providedIn:"root",factory:n}),o=function(){function e(e){if(this.value="ltr",this.change=new r.EventEmitter,e){var t=e.body?e.body.dir:null,n=e.documentElement?e.documentElement.dir:null,i=t||n;this.value="ltr"===i||"rtl"===i?i:"ltr"}}return e.prototype.ngOnDestroy=function(){this.change.complete()},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[i]}]}]},e.ngInjectableDef=r.ɵɵdefineInjectable({factory:function(){return new e(r.ɵɵinject(i,8))},token:e,providedIn:"root"}),e}(),c=function(){function e(){this._dir="ltr",this._isInitialized=!1,this.change=new r.EventEmitter}return Object.defineProperty(e.prototype,"dir",{get:function(){return this._dir},set:function(e){var t=this._dir,r=e?e.toLowerCase():e;this._rawDir=e,this._dir="ltr"===r||"rtl"===r?r:"ltr",t!==this._dir&&this._isInitialized&&this.change.emit(this._dir)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.dir},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this._isInitialized=!0},e.prototype.ngOnDestroy=function(){this.change.complete()},e.decorators=[{type:r.Directive,args:[{selector:"[dir]",providers:[{provide:o,useExisting:e}],host:{"[attr.dir]":"_rawDir"},exportAs:"dir"}]}],e.propDecorators={change:[{type:r.Output,args:["dirChange"]}],dir:[{type:r.Input}]},e}(),d=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{exports:[c],declarations:[c]}]}],e}();e.Directionality=o,e.DIR_DOCUMENT=i,e.Dir=c,e.BidiModule=d,ea=n,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=cdk-bidi.umd.min.js.map