-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path43-es5.0149678948629abe01dd.js
1 lines (1 loc) · 16.1 KB
/
43-es5.0149678948629abe01dd.js
1
!function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function e(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var r,i=n(t);if(e){var a=n(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return o(this,r)}}function o(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{Dh3D:function(t,i,o){"use strict";o.d(i,"a",function(){return _}),o.d(i,"b",function(){return C}),o.d(i,"c",function(){return x});var n=o("fXoL"),s=o("8LU1"),d=o("FKr1"),h=o("FtGj"),b=o("XNiG"),l=o("VRyK"),u=o("R0Ic"),f=o("ofXK"),m=o("u47x"),O=["mat-sort-header",""];function j(t,e){if(1&t){var r=n.fc();n.ec(0,"div",3),n.lc("@arrowPosition.start",function(){return n.Gc(r),n.pc()._disableViewStateAnimation=!0})("@arrowPosition.done",function(){return n.Gc(r),n.pc()._disableViewStateAnimation=!1}),n.Zb(1,"div",4),n.ec(2,"div",5),n.Zb(3,"div",6),n.Zb(4,"div",7),n.Zb(5,"div",8),n.dc(),n.dc()}if(2&t){var i=n.pc();n.vc("@arrowOpacity",i._getArrowViewState())("@arrowPosition",i._getArrowViewState())("@allowChildren",i._getArrowDirectionState()),n.Mb(2),n.vc("@indicator",i._getArrowDirectionState()),n.Mb(1),n.vc("@leftPointer",i._getArrowDirectionState()),n.Mb(1),n.vc("@rightPointer",i._getArrowDirectionState())}}var p=["*"],v=Object(d.D)(Object(d.B)(function t(){c(this,t)})),_=function(){var t=function(t){r(o,t);var i=a(o);function o(){var t;return c(this,o),(t=i.apply(this,arguments)).sortables=new Map,t._stateChanges=new b.a,t.start="asc",t._direction="",t.sortChange=new n.s,t}return e(o,[{key:"register",value:function(t){this.sortables.set(t.id,t)}},{key:"deregister",value:function(t){this.sortables.delete(t.id)}},{key:"sort",value: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.emit({active:this.active,direction:this.direction})}},{key:"getNextSortDirection",value:function(t){if(!t)return"";var e,r,i,a=(e=t.start||this.start,r=null!=t.disableClear?t.disableClear:this.disableClear,i=["asc","desc"],"desc"==e&&i.reverse(),r||i.push(""),i),o=a.indexOf(this.direction)+1;return o>=a.length&&(o=0),a[o]}},{key:"ngOnInit",value:function(){this._markInitialized()}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"direction",get:function(){return this._direction},set:function(t){this._direction=t}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=Object(s.c)(t)}}]),o}(v);return t.\u0275fac=function(e){return g(e||t)},t.\u0275dir=n.Tb({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[n.Jb,n.Kb]}),t}(),g=n.gc(_),w=d.b.ENTERING+" "+d.a.STANDARD_CURVE,S={indicator:Object(u.m)("indicator",[Object(u.j)("active-asc, asc",Object(u.k)({transform:"translateY(0px)"})),Object(u.j)("active-desc, desc",Object(u.k)({transform:"translateY(10px)"})),Object(u.l)("active-asc <=> active-desc",Object(u.e)(w))]),leftPointer:Object(u.m)("leftPointer",[Object(u.j)("active-asc, asc",Object(u.k)({transform:"rotate(-45deg)"})),Object(u.j)("active-desc, desc",Object(u.k)({transform:"rotate(45deg)"})),Object(u.l)("active-asc <=> active-desc",Object(u.e)(w))]),rightPointer:Object(u.m)("rightPointer",[Object(u.j)("active-asc, asc",Object(u.k)({transform:"rotate(45deg)"})),Object(u.j)("active-desc, desc",Object(u.k)({transform:"rotate(-45deg)"})),Object(u.l)("active-asc <=> active-desc",Object(u.e)(w))]),arrowOpacity:Object(u.m)("arrowOpacity",[Object(u.j)("desc-to-active, asc-to-active, active",Object(u.k)({opacity:1})),Object(u.j)("desc-to-hint, asc-to-hint, hint",Object(u.k)({opacity:.54})),Object(u.j)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Object(u.k)({opacity:0})),Object(u.l)("* => asc, * => desc, * => active, * => hint, * => void",Object(u.e)("0ms")),Object(u.l)("* <=> *",Object(u.e)(w))]),arrowPosition:Object(u.m)("arrowPosition",[Object(u.l)("* => desc-to-hint, * => desc-to-active",Object(u.e)(w,Object(u.g)([Object(u.k)({transform:"translateY(-25%)"}),Object(u.k)({transform:"translateY(0)"})]))),Object(u.l)("* => hint-to-desc, * => active-to-desc",Object(u.e)(w,Object(u.g)([Object(u.k)({transform:"translateY(0)"}),Object(u.k)({transform:"translateY(25%)"})]))),Object(u.l)("* => asc-to-hint, * => asc-to-active",Object(u.e)(w,Object(u.g)([Object(u.k)({transform:"translateY(25%)"}),Object(u.k)({transform:"translateY(0)"})]))),Object(u.l)("* => hint-to-asc, * => active-to-asc",Object(u.e)(w,Object(u.g)([Object(u.k)({transform:"translateY(0)"}),Object(u.k)({transform:"translateY(-25%)"})]))),Object(u.j)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Object(u.k)({transform:"translateY(0)"})),Object(u.j)("hint-to-desc, active-to-desc, desc",Object(u.k)({transform:"translateY(-25%)"})),Object(u.j)("hint-to-asc, active-to-asc, asc",Object(u.k)({transform:"translateY(25%)"}))]),allowChildren:Object(u.m)("allowChildren",[Object(u.l)("* <=> *",[Object(u.h)("@*",Object(u.f)(),{optional:!0})])])},y=function(){var t=function t(){c(this,t),this.changes=new b.a,this.sortButtonLabel=function(t){return"Change sorting for "+t}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Ub)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),k={provide:y,deps:[[new n.J,new n.T,y]],useFactory:function(t){return t||new y}},D=Object(d.B)(function t(){c(this,t)}),C=function(){var t=function(t){r(o,t);var i=a(o);function o(t,e,r,a,n,s){var d;return c(this,o),(d=i.call(this))._intl=t,d._sort=r,d._columnDef=a,d._focusMonitor=n,d._elementRef=s,d._showIndicatorHint=!1,d._arrowDirection="",d._disableViewStateAnimation=!1,d.arrowPosition="after",d._rerenderSubscription=Object(l.a)(r.sortChange,r._stateChanges,t.changes).subscribe(function(){d._isSorted()&&d._updateArrowDirection(),!d._isSorted()&&d._viewState&&"active"===d._viewState.toState&&(d._disableViewStateAnimation=!1,d._setAnimationTransitionState({fromState:"active",toState:d._arrowDirection})),e.markForCheck()}),d}return e(o,[{key:"ngOnInit",value:function(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){return t._setIndicatorHintVisible(!!e)})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}},{key:"_setIndicatorHintVisible",value:function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}},{key:"_setAnimationTransitionState",value:function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}},{key:"_toggleOnInteraction",value:function(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);var t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}},{key:"_handleClick",value:function(){this._isDisabled()||this._toggleOnInteraction()}},{key:"_handleKeydown",value:function(t){this._isDisabled()||t.keyCode!==h.o&&t.keyCode!==h.g||(t.preventDefault(),this._toggleOnInteraction())}},{key:"_isSorted",value:function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}},{key:"_getArrowDirectionState",value:function(){return"".concat(this._isSorted()?"active-":"").concat(this._arrowDirection)}},{key:"_getArrowViewState",value:function(){var t=this._viewState.fromState;return(t?t+"-to-":"")+this._viewState.toState}},{key:"_updateArrowDirection",value:function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}},{key:"_isDisabled",value:function(){return this._sort.disabled||this.disabled}},{key:"_getAriaSortAttribute",value:function(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}},{key:"_renderArrow",value:function(){return!this._isDisabled()||this._isSorted()}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=Object(s.c)(t)}}]),o}(D);return t.\u0275fac=function(e){return new(e||t)(n.Yb(y),n.Yb(n.i),n.Yb(_,8),n.Yb("MAT_SORT_HEADER_COLUMN_DEF",8),n.Yb(m.h),n.Yb(n.p))},t.\u0275cmp=n.Sb({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&n.lc("click",function(){return e._handleClick()})("keydown",function(t){return e._handleKeydown(t)})("mouseenter",function(){return e._setIndicatorHintVisible(!0)})("mouseleave",function(){return e._setIndicatorHintVisible(!1)}),2&t&&(n.Nb("aria-sort",e._getAriaSortAttribute()),n.Qb("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[n.Jb],attrs:O,ngContentSelectors:p,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(n.uc(),n.ec(0,"div",0),n.ec(1,"div",1),n.tc(2),n.dc(),n.Qc(3,j,6,6,"div",2),n.dc()),2&t&&(n.Qb("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),n.Nb("tabindex",e._isDisabled()?null:0),n.Mb(3),n.vc("ngIf",e._renderArrow()))},directives:[f.t],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .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}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[S.indicator,S.leftPointer,S.rightPointer,S.arrowOpacity,S.arrowPosition,S.allowChildren]},changeDetection:0}),t}(),x=function(){var t=function t(){c(this,t)};return t.\u0275mod=n.Wb({type:t}),t.\u0275inj=n.Vb({factory:function(e){return new(e||t)},providers:[k],imports:[[f.c,d.j]]}),t}()},iM0R:function(t,r,i){"use strict";i.r(r),i.d(r,"SortExamplesModule",function(){return b}),i.d(r,"SortOverviewExample",function(){return d});var a=i("ofXK"),o=i("fXoL"),n=i("Dh3D");function s(t,e){if(1&t&&(Object(o.ec)(0,"tr"),Object(o.ec)(1,"td"),Object(o.Sc)(2),Object(o.dc)(),Object(o.ec)(3,"td"),Object(o.Sc)(4),Object(o.dc)(),Object(o.ec)(5,"td"),Object(o.Sc)(6),Object(o.dc)(),Object(o.ec)(7,"td"),Object(o.Sc)(8),Object(o.dc)(),Object(o.ec)(9,"td"),Object(o.Sc)(10),Object(o.dc)(),Object(o.dc)()),2&t){var r=e.$implicit;Object(o.Mb)(2),Object(o.Tc)(r.name),Object(o.Mb)(2),Object(o.Tc)(r.calories),Object(o.Mb)(2),Object(o.Tc)(r.fat),Object(o.Mb)(2),Object(o.Tc)(r.carbs),Object(o.Mb)(2),Object(o.Tc)(r.protein)}}var d=function(){var t=function(){function t(){c(this,t),this.desserts=[{name:"Frozen yogurt",calories:159,fat:6,carbs:24,protein:4},{name:"Ice cream sandwich",calories:237,fat:9,carbs:37,protein:4},{name:"Eclair",calories:262,fat:16,carbs:24,protein:6},{name:"Cupcake",calories:305,fat:4,carbs:67,protein:4},{name:"Gingerbread",calories:356,fat:16,carbs:49,protein:4}],this.sortedData=this.desserts.slice()}return e(t,[{key:"sortData",value:function(t){var e=this.desserts.slice();this.sortedData=t.active&&""!==t.direction?e.sort(function(e,r){var i="asc"===t.direction;switch(t.active){case"name":return h(e.name,r.name,i);case"calories":return h(e.calories,r.calories,i);case"fat":return h(e.fat,r.fat,i);case"carbs":return h(e.carbs,r.carbs,i);case"protein":return h(e.protein,r.protein,i);default:return 0}}):e}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Object(o.Sb)({type:t,selectors:[["sort-overview-example"]],decls:13,vars:1,consts:[["matSort","",3,"matSortChange"],["mat-sort-header","name"],["mat-sort-header","calories"],["mat-sort-header","fat"],["mat-sort-header","carbs"],["mat-sort-header","protein"],[4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(Object(o.ec)(0,"table",0),Object(o.lc)("matSortChange",function(t){return e.sortData(t)}),Object(o.ec)(1,"tr"),Object(o.ec)(2,"th",1),Object(o.Sc)(3,"Dessert (100g)"),Object(o.dc)(),Object(o.ec)(4,"th",2),Object(o.Sc)(5,"Calories"),Object(o.dc)(),Object(o.ec)(6,"th",3),Object(o.Sc)(7,"Fat (g)"),Object(o.dc)(),Object(o.ec)(8,"th",4),Object(o.Sc)(9,"Carbs (g)"),Object(o.dc)(),Object(o.ec)(10,"th",5),Object(o.Sc)(11,"Protein (g)"),Object(o.dc)(),Object(o.dc)(),Object(o.Qc)(12,s,11,5,"tr",6),Object(o.dc)()),2&t&&(Object(o.Mb)(12),Object(o.vc)("ngForOf",e.sortedData))},directives:[n.a,n.b,a.s],styles:[".mat-sort-header-container[_ngcontent-%COMP%] {\n align-items: center;\n}"]}),t}();function h(t,e,r){return(t<e?-1:1)*(r?1:-1)}var b=function(){var t=function t(){c(this,t)};return t.\u0275mod=Object(o.Wb)({type:t}),t.\u0275inj=Object(o.Vb)({factory:function(e){return new(e||t)},imports:[[a.c,n.c]]}),t}()}}])}();