@angular/cdk
Version:
Angular Material Component Development Kit
30 lines • 3.06 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("@angular/cdk/bidi",["exports","@angular/core","@angular/common"],e):e(((t=t||self).ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.bidi={}),t.ng.core,t.ng.common)}(this,(function(t,e,r){"use strict";
/**
* @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
*/var n=new e.InjectionToken("cdk-dir-doc",{providedIn:"root",factory:i});function i(){return e.inject(r.DOCUMENT)}
/**
* @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
*/var o=function(){function t(t){if(this.value="ltr",this.change=new e.EventEmitter,t){var r=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===r||"rtl"===r?r:"ltr"}}return t.prototype.ngOnDestroy=function(){this.change.complete()},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[n]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function r(){return new t(e.ɵɵinject(n,8))},token:t,providedIn:"root"}),t}(),c=function(){function t(){this._dir="ltr",this._isInitialized=!1,this.change=new e.EventEmitter}return Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir},set:function(t){var e=this._dir,r=t?t.toLowerCase():t;this._rawDir=t,this._dir="ltr"===r||"rtl"===r?r:"ltr",e!==this._dir&&this._isInitialized&&this.change.emit(this._dir)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.dir},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._isInitialized=!0},t.prototype.ngOnDestroy=function(){this.change.complete()},t.decorators=[{type:e.Directive,args:[{selector:"[dir]",providers:[{provide:o,useExisting:t}],host:{"[attr.dir]":"_rawDir"},exportAs:"dir"}]}],t.propDecorators={change:[{type:e.Output,args:["dirChange"]}],dir:[{type:e.Input}]},t}(),d=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[c],declarations:[c]}]}],t}();
/**
* @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
*/
/**
* @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
*/
t.BidiModule=d,t.DIR_DOCUMENT=n,t.Dir=c,t.Directionality=o,t.ɵangular_material_src_cdk_bidi_bidi_a=i,Object.defineProperty(t,"__esModule",{value:!0})}));