-
Notifications
You must be signed in to change notification settings - Fork 1
/
src_app_custom-elements_events_event-list_module_ts.0250c264ec889be1.js
2 lines (2 loc) · 3.97 KB
/
src_app_custom-elements_events_event-list_module_ts.0250c264ec889be1.js
1
2
"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([["src_app_custom-elements_events_event-list_module_ts"],{1844:(I,d,o)=>{o.r(d),o.d(d,{EventListModule:()=>F});var E=o(3267),t=o(5460),l=o(2068),h=o(0),g=o(4788),y=o(2008);const f=g.y2+"events.json";let D=(()=>{var e;class i{constructor(n){this.http=n;const a=new Date;this.currentDate=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),this.events$=this.getEvents(),this.upcomingEvents$=this.events$.pipe((0,l.k)(r=>r.filter(c=>c.endDate>=this.currentDate))),this.pastEvents$=this.events$.pipe((0,l.k)(r=>r.filter(c=>c.endDate<this.currentDate)))}getEvents(){const n=this.http.get(f).pipe((0,l.k)(a=>a.map(r=>({...r,startDate:r.startDate?new Date(r.startDate):void 0,endDate:new Date(r.endDate)}))),(0,h.a)());return n.connect(),n}}return(e=i).\u0275fac=function(n){return new(n||e)(t.CoB(y.KK))},e.\u0275prov=t.wxM({token:e,factory:e.\u0275fac}),i})(),C=(()=>{var e;class i{transform(n){const a=n.startDate,r=n.endDate;return a&&a.getTime()!==r.getTime()?u(a)===u(r)&&v(a)===v(r)?u(a)+" "+p(a)+" - "+p(r)+", "+v(a):v(a)===v(r)?u(a)+" "+p(a)+" - "+u(r)+" "+p(r)+", "+v(a):m(a)+" - "+m(r):m(r)}}return(e=i).\u0275fac=function(n){return new(n||e)},e.\u0275pipe=t.UTH({name:"eventDateRange",type:e,pure:!0}),i})();const p=e=>e.getUTCDate(),u=e=>$[e.getUTCMonth()],v=e=>e.getUTCFullYear(),m=e=>u(e)+" "+p(e)+", "+v(e),$=["January","February","March","April","May","June","July","August","September","October","November","December"];let O=(()=>{var e;class i{transform(n,a){if(null===n)return[];switch(a){case"ascending":return n.sort((r,c)=>+(r.startDate||r.endDate)-+(c.startDate||c.endDate));case"descending":return n.sort((r,c)=>+(c.startDate||c.endDate)-+(r.startDate||r.endDate))}}}return(e=i).\u0275fac=function(n){return new(n||e)},e.\u0275pipe=t.UTH({name:"eventOrderBy",type:e,pure:!0}),i})();function R(e,i){if(1&e&&(t.I0R(0,"tr")(1,"th")(2,"a",2),t.OEk(3),t.C$Y()(),t.I0R(4,"td"),t.OEk(5),t.C$Y(),t.I0R(6,"td"),t.OEk(7),t.wVc(8,"eventDateRange"),t.C$Y()()),2&e){const s=i.$implicit;t.yG2(2),t.E7m("href",s.url,t.K6U)("title",s.name),t.yG2(),t.cNF(s.name),t.yG2(2),t.cNF(s.location),t.yG2(2),t.cNF(t.kDX(8,5,s))}}function Y(e,i){if(1&e&&(t.I0R(0,"tr")(1,"th")(2,"a",2),t.OEk(3),t.C$Y()(),t.I0R(4,"td"),t.OEk(5),t.C$Y(),t.I0R(6,"td"),t.OEk(7),t.wVc(8,"eventDateRange"),t.C$Y()()),2&e){const s=i.$implicit;t.yG2(2),t.E7m("href",s.url,t.K6U)("title",s.name),t.yG2(),t.cNF(s.name),t.yG2(2),t.cNF(s.location),t.yG2(2),t.cNF(t.kDX(8,5,s))}}let k=(()=>{var e;class i{constructor(n){this.eventService=n,this.upcomingEvents$=this.eventService.upcomingEvents$,this.pastEvents$=this.eventService.pastEvents$}}return(e=i).\u0275fac=function(n){return new(n||e)(t.GI1(D))},e.\u0275cmp=t.In1({type:e,selectors:[["aio-event-list"]],decls:30,vars:12,consts:[[1,"is-full-width"],[4,"ngFor","ngForOf"],[3,"href","title"]],template:function(n,a){1&n&&(t.I0R(0,"p"),t.OEk(1,"Upcoming Events presenting about NgRx:"),t.C$Y(),t.I0R(2,"table",0)(3,"thead")(4,"tr")(5,"th"),t.OEk(6,"Event"),t.C$Y(),t.I0R(7,"th"),t.OEk(8,"Location"),t.C$Y(),t.I0R(9,"th"),t.OEk(10,"Date"),t.C$Y()()(),t.I0R(11,"tbody"),t.yuY(12,R,9,7,"tr",1),t.wVc(13,"eventOrderBy"),t.wVc(14,"async"),t.C$Y()(),t.I0R(15,"p"),t.OEk(16,"Past Events:"),t.C$Y(),t.I0R(17,"table",0)(18,"thead")(19,"tr")(20,"th"),t.OEk(21,"Event"),t.C$Y(),t.I0R(22,"th"),t.OEk(23,"Location"),t.C$Y(),t.I0R(24,"th"),t.OEk(25,"Date"),t.C$Y()()(),t.I0R(26,"tbody"),t.yuY(27,Y,9,7,"tr",1),t.wVc(28,"eventOrderBy"),t.wVc(29,"async"),t.C$Y()()),2&n&&(t.yG2(12),t.E7m("ngForOf",t.g7$(13,2,t.kDX(14,5,a.upcomingEvents$),"ascending")),t.yG2(15),t.E7m("ngForOf",t.g7$(28,7,t.kDX(29,10,a.pastEvents$),"descending")))},dependencies:[E.ay,E.a,C,O],encapsulation:2}),i})(),F=(()=>{var e;class i{constructor(){this.customElementComponent=k}}return(e=i).\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.a4G({type:e}),e.\u0275inj=t.s3X({providers:[D],imports:[E.MD]}),i})()}}]);
//# sourceMappingURL=src_app_custom-elements_events_event-list_module_ts.0250c264ec889be1.js.map