2 lines
4.4 KiB
JavaScript
2 lines
4.4 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{tpRh:function(t,e,n){"use strict";n.r(e),n.d(e,"EventsModule",function(){return w});var c=n("ofXK"),o=n("fXoL"),r=n("LRne"),b=n("JIr8"),a=n("qZ0a"),s=n("jn67"),i=n("tk/3"),u=n("vHPH");const l=s.a+"events.json";let h=(()=>{class t{constructor(t,e){this.http=t,this.logger=e,this.events=this.getEvents()}getEvents(){const t=this.http.get(l).pipe(Object(b.a)(t=>(this.logger.error(new Error(`${l} request failed: ${t.message}`)),Object(r.a)([]))),Object(a.a)());return t.connect(),t}}return t.\u0275fac=function(e){return new(e||t)(o.Xb(i.a),o.Xb(u.a))},t.\u0275prov=o.Kb({token:t,factory:t.\u0275fac}),t})();function g(t,e){1&t&&(o.Tb(0,"div"),o.Tb(1,"p"),o.Ac(2,"We don't have any upcoming speaking engagements at the moment."),o.Sb(),o.Tb(3,"p"),o.Ac(4,"Until something comes up, make sure you check our "),o.Tb(5,"a",4),o.Ac(6,"YouTube channel"),o.Sb(),o.Ac(7," and follow us on "),o.Tb(8,"a",5),o.Ac(9,"social media"),o.Sb(),o.Ac(10,"."),o.Sb(),o.Tb(11,"p"),o.Ac(12,"If you want us to be part of your event reach out on "),o.Tb(13,"a",6),o.Ac(14,"devrel@angular.io"),o.Sb(),o.Ac(15,"!"),o.Sb(),o.Sb())}function p(t,e){if(1&t&&(o.Tb(0,"tr"),o.Tb(1,"th"),o.Tb(2,"a",7),o.Ac(3),o.Sb(),o.Sb(),o.Tb(4,"td"),o.Ac(5),o.Sb(),o.Tb(6,"td"),o.Tb(7,"div"),o.Ac(8),o.Sb(),o.Sb(),o.Sb()),2&t){const t=e.$implicit,n=o.ec(2);o.Cb(2),o.kc("href",t.linkUrl,o.uc),o.kc("title",t.tooltip),o.Cb(1),o.Bc(t.name),o.Cb(2),o.Bc(t.location),o.Cb(3),o.Cc(" ",n.getEventDates(t)," ")}}function T(t,e){if(1&t&&(o.Tb(0,"table",2),o.Tb(1,"thead"),o.Tb(2,"tr"),o.Tb(3,"th"),o.Ac(4,"Event"),o.Sb(),o.Tb(5,"th"),o.Ac(6,"Location"),o.Sb(),o.Tb(7,"th"),o.Ac(8,"Date"),o.Sb(),o.Sb(),o.Sb(),o.Tb(9,"tbody"),o.zc(10,p,9,5,"tr",3),o.Sb(),o.Sb()),2&t){const t=o.ec();o.Cb(10),o.jc("ngForOf",t.upcomingEvents)}}function d(t,e){if(1&t&&(o.Tb(0,"tr"),o.Tb(1,"th"),o.Tb(2,"a",7),o.Ac(3),o.Sb(),o.Sb(),o.Tb(4,"td"),o.Ac(5),o.Sb(),o.Tb(6,"td"),o.Tb(7,"div"),o.Ac(8),o.Sb(),o.Sb(),o.Sb()),2&t){const t=e.$implicit,n=o.ec();o.Cb(2),o.kc("href",t.linkUrl,o.uc),o.kc("title",t.tooltip),o.Cb(1),o.Bc(t.name),o.Cb(2),o.Bc(t.location),o.Cb(3),o.Cc(" ",n.getEventDates(t)," ")}}const f=["January","February","March","April","May","June","July","August","September","October","November","December"];let v=(()=>{class t{constructor(t){this.eventsService=t}ngOnInit(){this.eventsService.events.subscribe(t=>{this.pastEvents=t.filter(t=>new Date(t.date.end).getTime()<Date.now()-864e5).sort((t,e)=>m(t.date,e.date)?1:-1),this.upcomingEvents=t.filter(t=>new Date(t.date.end).getTime()>=Date.now()-864e5).sort((t,e)=>m(t.date,e.date)?-1:1)})}getEventDates(t){let e;if(t.workshopsDate){const n=S(t.date)+" (conference)",c=S(t.workshopsDate)+" (workshops)";e=m(t.workshopsDate,t.date)?`${c}, ${n}`:`${n}, ${c}`}else e=S(t.date);return e=`${e}, ${new Date(t.date.end).getUTCFullYear()}`,e}}return t.\u0275fac=function(e){return new(e||t)(o.Ob(h))},t.\u0275cmp=o.Ib({type:t,selectors:[["aio-events"]],decls:18,vars:3,consts:[[4,"ngIf"],["class","is-full-width",4,"ngIf"],[1,"is-full-width"],[4,"ngFor","ngForOf"],["href","https://www.youtube.com/angular"],["href","https://twitter.com/angular"],["href","mailto:devrel@angular.io"],[3,"href","title"]],template:function(t,e){1&t&&(o.Tb(0,"h2"),o.Ac(1,"Where we'll be presenting:"),o.Sb(),o.zc(2,g,16,0,"div",0),o.zc(3,T,11,1,"table",1),o.Pb(4,"br"),o.Tb(5,"h2"),o.Ac(6,"Where we already presented:"),o.Sb(),o.Tb(7,"table",2),o.Tb(8,"thead"),o.Tb(9,"tr"),o.Tb(10,"th"),o.Ac(11,"Event"),o.Sb(),o.Tb(12,"th"),o.Ac(13,"Location"),o.Sb(),o.Tb(14,"th"),o.Ac(15,"Date"),o.Sb(),o.Sb(),o.Sb(),o.Tb(16,"tbody"),o.zc(17,d,9,5,"tr",3),o.Sb(),o.Sb()),2&t&&(o.Cb(2),o.jc("ngIf",!(null!=e.upcomingEvents&&e.upcomingEvents.length)),o.Cb(1),o.jc("ngIf",null==e.upcomingEvents?null:e.upcomingEvents.length),o.Cb(14),o.jc("ngForOf",e.pastEvents))},directives:[c.k,c.j],encapsulation:2}),t})();function S(t){const e=new Date(t.start),n=new Date(t.end);let c=`${f[e.getUTCMonth()]} ${e.getUTCDate()}`;return e.getUTCMonth()!==n.getUTCMonth()?c=`${c} - ${f[n.getUTCMonth()]}
|
||
|
//# sourceMappingURL=events-events-module-es2015.6447f4bc09fdcfbb5676.js.map
|