UNPKG

@angular/material

Version:
9 lines 26.3 kB
/** * @license * Copyright Google Inc. 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(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/cdk/coercion"),require("@angular/animations"),require("@angular/cdk/table"),require("rxjs/observable/merge"),require("rxjs/Subject"),require("@angular/cdk/bidi"),require("@angular/platform-browser"),require("@angular/common"),require("@angular/cdk/platform"),require("@angular/cdk/keycodes")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/cdk/coercion","@angular/animations","@angular/cdk/table","rxjs/observable/merge","rxjs/Subject","@angular/cdk/bidi","@angular/platform-browser","@angular/common","@angular/cdk/platform","@angular/cdk/keycodes"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.sort=t.ng.material.sort||{}),t.ng.core,t.ng.cdk.coercion,t.ng.animations,t.ng.cdk.table,t.Rx.Observable,t.Rx,t.ng.cdk.bidi,t.ng.platformBrowser,t.ng.common,t.ng.cdk.platform,t.ng.cdk.keycodes)}(this,function(t,e,r,n,o,i,a,s,c,p,l,u){"use strict";function d(t,e){function r(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function h(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var n=0,o=e;n<o.length;n++){var i=o[n];if(null!=i)for(var a in i)i.hasOwnProperty(a)&&(t[a]=i[a])}return t}function f(t,e){for(var r=Array(t),n=0;n<t;n++)r[n]=e(n);return r}function g(t){window.getComputedStyle(t).getPropertyValue("opacity")}function m(t,e,r){var n=Math.max(Math.abs(t-r.left),Math.abs(t-r.right)),o=Math.max(Math.abs(e-r.top),Math.abs(e-r.bottom));return Math.sqrt(n*n+o*o)}function y(t){return Error("Cannot have two MatSortables with the same id ("+t+").")}function b(){return Error("MatSortHeader must be placed within a parent element with the MatSort directive.")}function _(){return Error("MatSortHeader must be provided with a unique id.")}function v(t){return Error(t+" is not a valid sort direction ('asc' or 'desc').")}function D(t,e){var r=["asc","desc"];return"desc"==t&&r.reverse(),e||r.push(""),r}var C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},w=function(){function t(){}return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t}(),I=function(){function t(){}return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t}(),E=(new e.InjectionToken("md-compatibility-mode"),new e.InjectionToken("mat-sanity-checks"),new e.InjectionToken("MAT_DATE_LOCALE")),O=function(){function t(){this._localeChanges=new a.Subject}return Object.defineProperty(t.prototype,"localeChanges",{get:function(){return this._localeChanges},enumerable:!0,configurable:!0}),t.prototype.getYear=function(t){},t.prototype.getMonth=function(t){},t.prototype.getDate=function(t){},t.prototype.getDayOfWeek=function(t){},t.prototype.getMonthNames=function(t){},t.prototype.getDateNames=function(){},t.prototype.getDayOfWeekNames=function(t){},t.prototype.getYearName=function(t){},t.prototype.getFirstDayOfWeek=function(){},t.prototype.getNumDaysInMonth=function(t){},t.prototype.clone=function(t){},t.prototype.createDate=function(t,e,r){},t.prototype.today=function(){},t.prototype.parse=function(t,e){},t.prototype.format=function(t,e){},t.prototype.addCalendarYears=function(t,e){},t.prototype.addCalendarMonths=function(t,e){},t.prototype.addCalendarDays=function(t,e){},t.prototype.toIso8601=function(t){},t.prototype.fromIso8601=function(t){},t.prototype.isDateInstance=function(t){},t.prototype.isValid=function(t){},t.prototype.setLocale=function(t){this.locale=t,this._localeChanges.next()},t.prototype.compareDate=function(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)},t.prototype.sameDate=function(t,e){return t&&e?!this.compareDate(t,e):t==e},t.prototype.clampDate=function(t,e,r){return e&&this.compareDate(t,e)<0?e:r&&this.compareDate(t,r)>0?r:t},t}(),R="undefined"!=typeof Intl,k={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},S=f(31,function(t){return String(t+1)}),M={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},P=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,T=(function(t){function r(e){var r=t.call(this)||this;return r.useUtcForDisplay=!0,t.prototype.setLocale.call(r,e),r}d(r,t),r.prototype.getYear=function(t){return t.getFullYear()},r.prototype.getMonth=function(t){return t.getMonth()},r.prototype.getDate=function(t){return t.getDate()},r.prototype.getDayOfWeek=function(t){return t.getDay()},r.prototype.getMonthNames=function(t){var e=this;if(R){var r=new Intl.DateTimeFormat(this.locale,{month:t});return f(12,function(t){return e._stripDirectionalityCharacters(r.format(new Date(2017,t,1)))})}return k[t]},r.prototype.getDateNames=function(){var t=this;if(R){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric"});return f(31,function(r){return t._stripDirectionalityCharacters(e.format(new Date(2017,0,r+1)))})}return S},r.prototype.getDayOfWeekNames=function(t){var e=this;if(R){var r=new Intl.DateTimeFormat(this.locale,{weekday:t});return f(7,function(t){return e._stripDirectionalityCharacters(r.format(new Date(2017,0,t+1)))})}return M[t]},r.prototype.getYearName=function(t){if(R){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric"});return this._stripDirectionalityCharacters(e.format(t))}return String(this.getYear(t))},r.prototype.getFirstDayOfWeek=function(){return 0},r.prototype.getNumDaysInMonth=function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))},r.prototype.clone=function(t){return this.createDate(this.getYear(t),this.getMonth(t),this.getDate(t))},r.prototype.createDate=function(t,e,r){if(e<0||e>11)throw Error('Invalid month index "'+e+'". Month index has to be between 0 and 11.');if(r<1)throw Error('Invalid date "'+r+'". Date has to be greater than 0.');var n=this._createDateWithOverflow(t,e,r);if(n.getMonth()!=e)throw Error('Invalid date "'+r+'" for month with index "'+e+'".');return n},r.prototype.today=function(){return new Date},r.prototype.parse=function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null},r.prototype.format=function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(R){this.useUtcForDisplay&&(t=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())),e=h({},e,{timeZone:"utc"}));var r=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(r.format(t))}return this._stripDirectionalityCharacters(t.toDateString())},r.prototype.addCalendarYears=function(t,e){return this.addCalendarMonths(t,12*e)},r.prototype.addCalendarMonths=function(t,e){var r=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(r)!=((this.getMonth(t)+e)%12+12)%12&&(r=this._createDateWithOverflow(this.getYear(r),this.getMonth(r),0)),r},r.prototype.addCalendarDays=function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)},r.prototype.toIso8601=function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")},r.prototype.fromIso8601=function(t){if(P.test(t)){var e=new Date(t);if(this.isValid(e))return e}return null},r.prototype.isDateInstance=function(t){return t instanceof Date},r.prototype.isValid=function(t){return!isNaN(t.getTime())},r.prototype._createDateWithOverflow=function(t,e,r){var n=new Date(t,e,r);return t>=0&&t<100&&n.setFullYear(this.getYear(n)-1900),n},r.prototype._2digit=function(t){return("00"+t).slice(-2)},r.prototype._stripDirectionalityCharacters=function(t){return t.replace(/[\u200e\u200f]/g,"")},r.decorators=[{type:e.Injectable}],r.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[E]}]}]}}(O),new e.InjectionToken("mat-date-formats"),function(t){function r(){var r=t.call(this)||this;return r._hammer="undefined"!=typeof window?window.Hammer:null,r.events=r._hammer?["longpress","slide","slidestart","slideend","slideright","slideleft"]:[],!r._hammer&&e.isDevMode()&&console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),r}d(r,t),r.prototype.buildHammer=function(t){var e=new this._hammer(t),r=new this._hammer.Pan,n=new this._hammer.Swipe,o=new this._hammer.Press,i=this._createRecognizer(r,{event:"slide",threshold:0},n),a=this._createRecognizer(o,{event:"longpress",time:500});return r.recognizeWith(n),e.add([n,o,r,i,a]),e},r.prototype._createRecognizer=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=new t.constructor(e);return r.push(t),r.forEach(function(t){return o.recognizeWith(t)}),o},r.decorators=[{type:e.Injectable}],r.ctorParameters=function(){return[]}}(c.HammerGestureConfig),{});T.FADING_IN=0,T.VISIBLE=1,T.FADING_OUT=2,T.HIDDEN=3,T[T.FADING_IN]="FADING_IN",T[T.VISIBLE]="VISIBLE",T[T.FADING_OUT]="FADING_OUT",T[T.HIDDEN]="HIDDEN";var x=function(){function t(t,e,r){this._renderer=t,this.element=e,this.config=r,this.state=T.HIDDEN}return t.prototype.fadeOut=function(){this._renderer.fadeOutRipple(this)},t}(),N=function(){function t(t,e,r){this._ngZone=e,this._isPointerDown=!1,this._triggerEvents=new Map,this._activeRipples=new Set,this.rippleConfig={},this.rippleDisabled=!1,r.isBrowser&&(this._containerElement=t.nativeElement,this._triggerEvents.set("mousedown",this.onMousedown.bind(this)),this._triggerEvents.set("touchstart",this.onTouchstart.bind(this)),this._triggerEvents.set("mouseup",this.onPointerUp.bind(this)),this._triggerEvents.set("touchend",this.onPointerUp.bind(this)),this._triggerEvents.set("mouseleave",this.onPointerLeave.bind(this)),this.setTriggerElement(this._containerElement))}return t.prototype.fadeInRipple=function(t,e,r){var n=this;void 0===r&&(r={});var o=this._containerElement.getBoundingClientRect();r.centered&&(t=o.left+o.width/2,e=o.top+o.height/2);var i=r.radius||m(t,e,o),a=1/(r.speedFactor||1)*450,s=t-o.left,c=e-o.top,p=document.createElement("div");p.classList.add("mat-ripple-element"),p.style.left=s-i+"px",p.style.top=c-i+"px",p.style.height=2*i+"px",p.style.width=2*i+"px",p.style.backgroundColor=r.color||null,p.style.transitionDuration=a+"ms",this._containerElement.appendChild(p),g(p),p.style.transform="scale(1)";var l=new x(this,p,r);return l.state=T.FADING_IN,this._activeRipples.add(l),this.runTimeoutOutsideZone(function(){l.state=T.VISIBLE,r.persistent||n._isPointerDown||l.fadeOut()},a),l},t.prototype.fadeOutRipple=function(t){if(this._activeRipples.delete(t)){var e=t.element;e.style.transitionDuration="400ms",e.style.opacity="0",t.state=T.FADING_OUT,this.runTimeoutOutsideZone(function(){t.state=T.HIDDEN,e.parentNode.removeChild(e)},400)}},t.prototype.fadeOutAll=function(){this._activeRipples.forEach(function(t){return t.fadeOut()})},t.prototype.setTriggerElement=function(t){var e=this;this._triggerElement&&this._triggerEvents.forEach(function(t,r){e._triggerElement.removeEventListener(r,t)}),t&&this._ngZone.runOutsideAngular(function(){e._triggerEvents.forEach(function(e,r){return t.addEventListener(r,e)})}),this._triggerElement=t},t.prototype.onMousedown=function(t){this.rippleDisabled||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this.rippleConfig))},t.prototype.onPointerUp=function(){this._isPointerDown=!1,this._activeRipples.forEach(function(t){t.config.persistent||t.state!==T.VISIBLE||t.fadeOut()})},t.prototype.onPointerLeave=function(){this._isPointerDown&&this.onPointerUp()},t.prototype.onTouchstart=function(t){if(!this.rippleDisabled){var e=t.touches[0],r=e.clientX,n=e.clientY;this._isPointerDown=!0,this.fadeInRipple(r,n,this.rippleConfig)}},t.prototype.runTimeoutOutsideZone=function(t,e){void 0===e&&(e=0),this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})},t}(),A=new e.InjectionToken("mat-ripple-global-options"),F=(function(){function t(t,e,r,n){this.radius=0,this.speedFactor=1,this._rippleRenderer=new N(t,e,r),this._globalOptions=n||{},this._updateRippleRenderer()}t.prototype.ngOnChanges=function(t){(t.trigger||t._matRippleTrigger)&&this.trigger&&this._rippleRenderer.setTriggerElement(this.trigger),this._updateRippleRenderer()},t.prototype.ngOnDestroy=function(){this._rippleRenderer.setTriggerElement(null)},t.prototype.launch=function(t,e,r){return void 0===r&&(r=this.rippleConfig),this._rippleRenderer.fadeInRipple(t,e,r)},t.prototype.fadeOutAll=function(){this._rippleRenderer.fadeOutAll()},Object.defineProperty(t.prototype,"rippleConfig",{get:function(){return{centered:this.centered,speedFactor:this.speedFactor*(this._globalOptions.baseSpeedFactor||1),radius:this.radius,color:this.color}},enumerable:!0,configurable:!0}),t.prototype._updateRippleRenderer=function(){this._rippleRenderer.rippleDisabled=this._globalOptions.disabled||this.disabled,this._rippleRenderer.rippleConfig=this.rippleConfig},t.decorators=[{type:e.Directive,args:[{selector:"[mat-ripple], [matRipple]",exportAs:"matRipple",host:{class:"mat-ripple","[class.mat-ripple-unbounded]":"unbounded"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:l.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[A]}]}]},t.propDecorators={trigger:[{type:e.Input,args:["matRippleTrigger"]}],centered:[{type:e.Input,args:["matRippleCentered"]}],disabled:[{type:e.Input,args:["matRippleDisabled"]}],radius:[{type:e.Input,args:["matRippleRadius"]}],speedFactor:[{type:e.Input,args:["matRippleSpeedFactor"]}],color:[{type:e.Input,args:["matRippleColor"]}],unbounded:[{type:e.Input,args:["matRippleUnbounded"]}]}}(),function(){function t(){}return t}()),j=function(t){return function(t){function e(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.apply(this,e)||this;return n._disabled=!1,n}return d(e,t),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),e}(t)}(F),Y=0,L=function(t){function r(){var e=null!==t&&t.apply(this,arguments)||this;return e._labelId="mat-optgroup-label-"+Y++,e}return d(r,t),r.decorators=[{type:e.Component,args:[{selector:"mat-optgroup",exportAs:"matOptgroup",template:'<label class="mat-optgroup-label" [id]="_labelId">{{ label }}</label><ng-content select="mat-option"></ng-content>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["disabled"],host:{class:"mat-optgroup",role:"group","[class.mat-optgroup-disabled]":"disabled","[attr.aria-disabled]":"disabled.toString()","[attr.aria-labelledby]":"_labelId"}}]}],r.ctorParameters=function(){return[]},r.propDecorators={label:[{type:e.Input}]},r}(j),V=0,U=function(){function t(t,e){void 0===e&&(e=!1),this.source=t,this.isUserInput=e}return t}(),W=(function(){function t(t,r,n){this._element=t,this._changeDetectorRef=r,this.group=n,this._selected=!1,this._active=!1,this._multiple=!1,this._disableRipple=!1,this._disabled=!1,this._id="mat-option-"+V++,this.onSelectionChange=new e.EventEmitter}Object.defineProperty(t.prototype,"multiple",{get:function(){return this._multiple},set:function(t){t!==this._multiple&&(this._multiple=t,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=t,this._changeDetectorRef.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewValue",{get:function(){return(this._getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),t.prototype.select=function(){this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.deselect=function(){this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent()},t.prototype.focus=function(){var t=this._getHostElement();"function"==typeof t.focus&&t.focus()},t.prototype.setActiveStyles=function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())},t.prototype.setInactiveStyles=function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())},t.prototype.getLabel=function(){return this.viewValue},t.prototype._handleKeydown=function(t){t.keyCode!==u.ENTER&&t.keyCode!==u.SPACE||(this._selectViaInteraction(),t.preventDefault())},t.prototype._selectViaInteraction=function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))},t.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},t.prototype._getHostElement=function(){return this._element.nativeElement},t.prototype._emitSelectionChangeEvent=function(t){void 0===t&&(t=!1),this.onSelectionChange.emit(new U(this,t))},t.countGroupLabelsBeforeOption=function(t,e,r){if(r.length){for(var n=e.toArray(),o=r.toArray(),i=0,a=0;a<t+1;a++)n[a].group&&n[a].group===o[i]&&i++;return i}return 0},t.decorators=[{type:e.Component,args:[{selector:"mat-option",exportAs:"matOption",host:{role:"option","[attr.tabindex]":"_getTabIndex()","[class.mat-selected]":"selected","[class.mat-option-multiple]":"multiple","[class.mat-active]":"active","[id]":"id","[attr.aria-selected]":"selected.toString()","[attr.aria-disabled]":"disabled.toString()","[class.mat-option-disabled]":"disabled","(click)":"_selectViaInteraction()","(keydown)":"_handleKeydown($event)",class:"mat-option"},template:'<span *ngIf="multiple"><mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="selected ? \'checked\' : \'\'" [disabled]="disabled"></mat-pseudo-checkbox></span><span class="mat-option-text"><ng-content></ng-content></span><div class="mat-option-ripple" mat-ripple [matRippleTrigger]="_getHostElement()" [matRippleDisabled]="disabled || disableRipple"></div>',encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:L,decorators:[{type:e.Optional}]}]},t.propDecorators={value:[{type:e.Input}],disabled:[{type:e.Input}],onSelectionChange:[{type:e.Output}]}}(),new e.InjectionToken("mat-placeholder-global-options"),function(){function t(){this.sortables=new Map,this.start="asc",this._direction="",this.sortChange=new e.EventEmitter}return Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(t){if(e.isDevMode()&&t&&"asc"!==t&&"desc"!==t)throw v(t);this._direction=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableClear",{get:function(){return this._disableClear},set:function(t){this._disableClear=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.register=function(t){if(!t.id)throw _();if(this.sortables.has(t.id))throw y(t.id);this.sortables.set(t.id,t)},t.prototype.deregister=function(t){this.sortables.delete(t.id)},t.prototype.sort=function(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.next({active:this.active,direction:this.direction})},t.prototype.getNextSortDirection=function(t){if(!t)return"";var e=null!=t.disableClear?t.disableClear:this.disableClear,r=D(t.start||this.start,e),n=r.indexOf(this.direction)+1;return n>=r.length&&(n=0),r[n]},t.decorators=[{type:e.Directive,args:[{selector:"[matSort]"}]}],t.ctorParameters=function(){return[]},t.propDecorators={active:[{type:e.Input,args:["matSortActive"]}],start:[{type:e.Input,args:["matSortStart"]}],direction:[{type:e.Input,args:["matSortDirection"]}],disableClear:[{type:e.Input,args:["matSortDisableClear"]}],sortChange:[{type:e.Output,args:["matSortChange"]}]},t}()),H=function(){function t(){this.changes=new a.Subject,this.sortButtonLabel=function(t){return"Change sorting for "+t},this.sortDescriptionLabel=function(t,e){return"Sorted by "+t+" "+("asc"==e?"ascending":"descending")}}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),B=I.ENTERING+" "+w.STANDARD_CURVE,q=function(){function t(t,e,r,n){if(this._intl=t,this._sort=r,this._cdkColumnDef=n,this.arrowPosition="after",!r)throw b();this._rerenderSubscription=i.merge(r.sortChange,t.changes).subscribe(function(){e.markForCheck()})}return Object.defineProperty(t.prototype,"disableClear",{get:function(){return this._disableClear},set:function(t){this._disableClear=r.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){!this.id&&this._cdkColumnDef&&(this.id=this._cdkColumnDef.name),this._sort.register(this)},t.prototype.ngOnDestroy=function(){this._sort.deregister(this),this._rerenderSubscription.unsubscribe()},t.prototype._isSorted=function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)},t.decorators=[{type:e.Component,args:[{selector:"[mat-sort-header]",template:'<div class="mat-sort-header-container" [class.mat-sort-header-position-before]="arrowPosition == \'before\'"><button class="mat-sort-header-button" type="button" [attr.aria-label]="_intl.sortButtonLabel(id)"><ng-content></ng-content></button><div *ngIf="_isSorted()" class="mat-sort-header-arrow" [@indicatorToggle]="_sort.direction"><div class="mat-sort-header-stem"></div><div class="mat-sort-header-indicator" [@indicator]="_sort.direction"><div class="mat-sort-header-pointer-left" [@leftPointer]="_sort.direction"></div><div class="mat-sort-header-pointer-right" [@rightPointer]="_sort.direction"></div><div class="mat-sort-header-pointer-middle"></div></div></div></div><span class="cdk-visually-hidden" *ngIf="_isSorted()">{{_intl.sortDescriptionLabel(id, _sort.direction)}}</span>',styles:[".mat-sort-header-container{display:flex;cursor:pointer}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-button{border:none;background:0 0;display:flex;align-items:center;padding:0;cursor:pointer;outline:0;font:inherit;color:currentColor}.mat-sort-header-arrow{height:12px;width:12px;margin:0 0 0 6px;position:relative;display:flex}.mat-sort-header-position-before .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0;transition:225ms cubic-bezier(.4,0,.2,1)}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;transition:225ms cubic-bezier(.4,0,.2,1);position:absolute;top:0}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],host:{"(click)":"_sort.sort(this)","[class.mat-sort-header-sorted]":"_isSorted()"},encapsulation:e.ViewEncapsulation.None,preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("indicator",[n.state("asc",n.style({transform:"translateY(0px)"})),n.state("desc",n.style({transform:"translateY(10px)"})),n.transition("asc <=> desc",n.animate(B))]),n.trigger("leftPointer",[n.state("asc",n.style({transform:"rotate(-45deg)"})),n.state("desc",n.style({transform:"rotate(45deg)"})),n.transition("asc <=> desc",n.animate(B))]),n.trigger("rightPointer",[n.state("asc",n.style({transform:"rotate(45deg)"})),n.state("desc",n.style({transform:"rotate(-45deg)"})),n.transition("asc <=> desc",n.animate(B))]),n.trigger("indicatorToggle",[n.transition("void => asc",n.animate(B,n.keyframes([n.style({transform:"translateY(25%)",opacity:0}),n.style({transform:"none",opacity:1})]))),n.transition("asc => void",n.animate(B,n.keyframes([n.style({transform:"none",opacity:1}),n.style({transform:"translateY(-25%)",opacity:0})]))),n.transition("void => desc",n.animate(B,n.keyframes([n.style({transform:"translateY(-25%)",opacity:0}),n.style({transform:"none",opacity:1})]))),n.transition("desc => void",n.animate(B,n.keyframes([n.style({transform:"none",opacity:1}),n.style({transform:"translateY(25%)",opacity:0})])))])]}]}],t.ctorParameters=function(){return[{type:H},{type:e.ChangeDetectorRef},{type:W,decorators:[{type:e.Optional}]},{type:o.CdkColumnDef,decorators:[{type:e.Optional}]}]},t.propDecorators={id:[{type:e.Input,args:["mat-sort-header"]}],arrowPosition:[{type:e.Input}],start:[{type:e.Input,args:["start"]}],disableClear:[{type:e.Input}]},t}(),G=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[p.CommonModule],exports:[W,q],declarations:[W,q],providers:[H]}]}],t.ctorParameters=function(){return[]},t}();t.MatSortModule=G,t.MatSortHeader=q,t.MatSortHeaderIntl=H,t.MatSort=W,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=/Users/karakara/repos/material2/dist/bundles/material-sort.umd.min.js.map