-
Notifications
You must be signed in to change notification settings - Fork 0
/
src_app_custom-elements_events_events_module_ts.577ef9b126a0c22e.js.map
1 lines (1 loc) · 8.05 KB
/
src_app_custom-elements_events_events_module_ts.577ef9b126a0c22e.js.map
1
{"version":3,"file":"src_app_custom-elements_events_events_module_ts.577ef9b126a0c22e.js","mappings":"wQAUA,MAAMA,EAAaC,KAAqB,cAAc,IAGzCC,EAAa,MAD1B,MACaA,EAGXC,YAAoBC,EAA0BC,GAA1BC,KAAAF,OAA0BE,KAAAD,SAC5CC,KAAKC,OAASD,KAAKE,WACrB,CAEQA,YACN,MAAMC,EAAeH,KAAKF,KAAKM,IAASV,GAAYW,QAClDC,KAAYC,IACVP,KAAKD,OAAOQ,MAAM,IAAIC,MAAM,GAAGd,qBAA8Ba,EAAME,aAAU,EACtEC,MAAG,OAGRT,KAASU,KAAYR,EAAc,CACvCS,UAAWA,IAAM,IAAIC,IACrBC,mBAAmB,IAErBb,SAAOc,UACAd,CACT,CAACe,SAAAhB,KAAA,mBAAAiB,iBApBUrB,GAAasB,MAAAC,MAAAD,MAAAE,KAAA,EAAAJ,SAAAhB,KAAA,WAAAqB,EAAAC,IAAA,OAAb1B,EAAa2B,QAAb3B,EAAa4B,mBAAb5B,CAAa,2BCXxBsB,MAAA,QAAAA,CAA2B,OACtBA,MAAA,oEAA8DA,QACjEA,MAAA,OACEA,MAAA,yDAAkDA,MAAA,SAA0CA,MAAA,qBAAeA,QAC3GA,MAAA,wBAAiBA,MAAA,SAAsCA,MAAA,kBAAYA,QAAIA,MAAA,SACzEA,QACAA,MAAA,QACEA,MAAA,6DAAqDA,MAAA,UAAmCA,MAAA,wBAAqBA,QAAIA,MAAA,SACnHA,gCAGAA,MAAA,uDADFA,MAAA,GACEA,MAAA,EAAAO,EAAA,sBACFP,0CADiBA,cAAA,mBAAAQ,EAAAR,CAA+B,0BAAAA,MAAA,EAAAS,EAAAC,EAAAC,uCAOlDX,MAAA,4BAaUA,MAAA,UAA4BA,MAAA,GAAg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lB5BtC,MAAA,QAAIA,MAAA,gCAA0BA,QAC9BA,MAAA,KACEA,MAAA,EAAAwC,EAAA,aAAAxC,CASM,EAAAyC,EAAA,sBAIRzC,QAEAA,MAAA,QAEAA,MAAA,QAAIA,MAAA,iCAA2BA,QAC/BA,MAAA,EAAA0C,EAAA,qBAAA1C,CAA+F,EAAA2C,EAAA,yBAAA3C,+BAnBjFA,MAAA,GAAAA,MAAA,aAAAuC,EAAA5B,eAAAiC,QACN5C,cAAA,mBAkBOA,MAAA,GAAAA,MAAA,mBAAAQ,EAAAR,CAA+B,0BAAAA,MAAA,EAAAS,EAAA8B,EAAAhB,gFCFjCF,CAAe,KAoB5B,SAASO,EAAYD,GACnB,OAAO,IAAIkB,KAAKlB,EAAMV,KAAKC,OAAO4B,UAAYD,KAAKE,MAnCzC,KAoCZ,KC7BaC,EAAY,MALzB,MAKaA,EALbrE,cAMEG,KAAAmE,uBAAoC5B,EACrCvB,SAAAhB,KAAA,mBAAAiB,iBAFYiD,EAAY,EAAAlD,SAAAhB,KAAA,UAAAqB,EAAA+C,IAAA,MAAZF,IAAYlD,SAAAhB,KAAA,UAAAqB,EAAAgD,IAAA,WAFZ,CAAEzE,GAAe0E,QAAA,CAFjBC,eAIAL,CAAY","names":["eventsPath","CONTENT_URL_PREFIX","EventsService","constructor","http","logger","this","events","getEvents","eventsSource","get","pipe","catchError","error","Error","message","of","connectable","connector","AsyncSubject","resetOnDisconnect","connect","static","t","i0","i1","i2","core","wxM","factory","ɵfac","EventsComponent_ng_container_4_ng_container_1_Template","_r4","_c0","ctx_r1","upcomingEvents","event_r8","name","linkUrl","EventsComponent_ng_template_9_tr_8_span_2_Template","EventsComponent_ng_template_9_tr_8_a_3_Template","date","start","EventsComponent_ng_template_9_tr_8_Template","events_r6","EventsComponent","eventsService","pastEvents","ngOnInit","subscribe","filter","event","isInThePast","sort","l","r","In1","selectors","decls","vars","consts","template","rf","ctx","EventsComponent_div_3_Template","EventsComponent_ng_container_4_Template","EventsComponent_ng_container_8_Template","EventsComponent_ng_template_9_Template","length","Date","getTime","now","EventsModule","customElementComponent","a4G","s3X","imports","CommonModule"],"sourceRoot":"webpack:///","sources":["./src/app/custom-elements/events/events.service.ts","./src/app/custom-elements/events/events.component.html","./src/app/custom-elements/events/events.component.ts","./src/app/custom-elements/events/events.module.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\n\nimport {AsyncSubject, connectable, Observable, of} from 'rxjs';\nimport {catchError} from 'rxjs/operators';\n\nimport {AngularEvent} from './events.component';\nimport {CONTENT_URL_PREFIX} from 'app/documents/document.service';\nimport {Logger} from 'app/shared/logger.service';\n\nconst eventsPath = CONTENT_URL_PREFIX + 'events.json';\n\n@Injectable()\nexport class EventsService {\n events: Observable<AngularEvent[]>;\n\n constructor(private http: HttpClient, private logger: Logger) {\n this.events = this.getEvents();\n }\n\n private getEvents() {\n const eventsSource = this.http.get<any>(eventsPath).pipe(\n catchError((error) => {\n this.logger.error(new Error(`${eventsPath} request failed: ${error.message}`));\n return of([]);\n })\n );\n const events = connectable(eventsSource, {\n connector: () => new AsyncSubject(),\n resetOnDisconnect: false,\n });\n events.connect();\n return events;\n }\n}\n","<h2>Where we'll be presenting:</h2>\n<ng-container [ngSwitch]=\"!!upcomingEvents.length\">\n <div *ngSwitchCase=\"false\">\n <p>We don't have any upcoming speaking engagements at the moment.</p>\n <p>\n Until something comes up, make sure you check our <a href=\"https://www.youtube.com/angular\">YouTube channel</a>\n and follow us on <a href=\"https://twitter.com/angular\">social media</a>.\n </p>\n <p>\n If you want us to be part of your event reach out on <a href=\"mailto:[email protected]\">devrel@angular.io</a>!\n </p>\n </div>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"eventsTable; context: {$implicit: upcomingEvents}\"></ng-container>\n </ng-container>\n</ng-container>\n\n<br />\n\n<h2>Where we already presented:</h2>\n<ng-container *ngTemplateOutlet=\"eventsTable; context: {$implicit: pastEvents}\"></ng-container>\n\n<ng-template #eventsTable let-events>\n <table class=\"is-full-width\">\n <thead>\n <tr>\n <th>Event</th>\n <th>Start date</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let event of events\">\n <th [ngSwitch]=\"!!event.linkUrl\">\n <span *ngSwitchCase=\"false\">{{ event.name }}</span>\n <a *ngSwitchDefault href=\"{{ event.linkUrl }}\">{{ event.name }}</a>\n </th>\n <td>{{ event.date.start }}</td>\n </tr>\n </tbody>\n </table>\n</ng-template>\n","import { Component, OnInit } from '@angular/core';\n\nimport { EventsService } from './events.service';\n\nconst DAY = 24 * 60 * 60 * 1000;\n\nexport interface AngularEvent {\n name: string;\n linkUrl?: string;\n date: {\n start: `${number}-${number}-${number}`; // Date string in the format: `YYYY-MM-DD`\n };\n}\n\n@Component({\n selector: 'aio-events',\n templateUrl: 'events.component.html'\n})\nexport class EventsComponent implements OnInit {\n\n pastEvents: AngularEvent[] = [];\n upcomingEvents: AngularEvent[] = [];\n\n constructor(private eventsService: EventsService) { }\n\n ngOnInit() {\n this.eventsService.events.subscribe(events => {\n this.pastEvents = events\n .filter(event => isInThePast(event))\n .sort((l: AngularEvent, r: AngularEvent) => (l.date.start < r.date.start) ? 1 : -1);\n\n this.upcomingEvents = events\n .filter(event => !isInThePast(event))\n .sort((l: AngularEvent, r: AngularEvent) => (l.date.start < r.date.start) ? -1 : 1);\n });\n }\n}\n\nfunction isInThePast(event: AngularEvent): boolean {\n return new Date(event.date.start).getTime() < Date.now() - DAY;\n}\n","import { NgModule, Type } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EventsComponent } from './events.component';\nimport { EventsService } from './events.service';\nimport { WithCustomElementComponent } from '../element-registry';\n\n@NgModule({\n imports: [ CommonModule ],\n declarations: [ EventsComponent ],\n providers: [ EventsService ],\n})\nexport class EventsModule implements WithCustomElementComponent {\n customElementComponent: Type<any> = EventsComponent;\n}\n"],"x_google_ignoreList":[]}