\\r\\n הדף אליו ניסית להגיע איננו בנמצא.\\r\\n ניתן\\r\\n לחזור אחורה\\r\\n או לנסות להכנס ל\\r\\n דף הבית |\\r\\n בית המדרש |\\r\\n שאל את הרב |\\r\\n ויקישיבה.\\r\\n אם לדעתך מדובר בטעות והדף אמור להופיע, ניתן\\r\\n לספר לנו על כך.\\r\\n \\r\\n
\\r\\n במקרה של תקלה חריגה באתר ניתן לפנות לצוות האתר באמצעות הדוא\\\"ל\\r\\n beitel@yeshiva.org.il\\r\\n
\\r\\n אם הגעת בעקבות קישור ישן לבית המדרש שלנו, אפשר לחפש\\r\\n בקישור החדש.\\r\\n
\\r\\n \\r\\n
\\r\\n The page you sought was not found.\\r\\n You can\\r\\n step back\\r\\n or try our\\r\\n homepage |\\r\\n Beit Midrash |\\r\\n Ask The Rabbi.\\r\\n If you think the page\\r\\n should have been here please\\r\\n tell us about this issue.\\r\\n \\r\\n
\\r\\n In the case of exceptional failure please contact the site administrator via email\\r\\n beitel@yeshiva.org.il\\r\\n
יהי רצון... שלא יארע דבר תקלה על ידנו\\r\\n (תפילה בכניסה לבית המדרש)\\r\\n
\\r\\n
\\r\\n יישר כח על רצונכם ללמוד תורה!\\r\\n לצערנו בפעם זו הדף לא הצליח להטען.\\r\\n אנא\\r\\n חזרו אחורה ונסו שנית בעוד מספר דקות.\\r\\n אם הבעיה נשנית ניתן\\r\\n לספר לנו על כך.\\r\\n אנו מתנצלים על אי הנוחות.\\r\\n
\\r\\n במקרה של תקלה חריגה באתר ניתן לפנות לצוות האתר באמצעות הדוא\\\"ל\\r\\n beitel@yeshiva.org.il\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n Yishar Koach for coming to learn Torah!\\r\\n Unfortunately, we were unable to process the page this time.\\r\\n Please\\r\\n retrace your steps and try again in a few minutes.\\r\\n If the problem recurs please\\r\\n inform us.\\r\\n We apologize for the inconvenience.\\r\\n \\r\\n
\\r\\n In the case of exceptional failure please contact the site administrator via email\\r\\n beitel@yeshiva.org.il\\r\\n
\\r\\n\"","module.exports = \"#rabbisAndFormat {\\n display: flex;\\n justify-content: space-between;\\n padding: 10px; }\\n\\n#rabbis {\\n display: flex;\\n flex-flow: wrap; }\\n\\n#rabbis .rabbiFilter {\\n padding: 5px 0;\\n -webkit-padding-end: 20px;\\n padding-inline-end: 20px; }\\n\\n#rabbis span {\\n border: 1px solid black;\\n background: #ffffff;\\n height: 25px;\\n padding: 3px; }\\n\\n#rabbis span:first-child {\\n -webkit-border-end: 0;\\n border-inline-end: 0;\\n -webkit-padding-start: 5px;\\n padding-inline-start: 5px;\\n -webkit-padding-end: 20px;\\n padding-inline-end: 20px; }\\n\\n#rabbis span:last-child {\\n -webkit-border-start: 0;\\n border-inline-start: 0;\\n color: white; }\\n\\n#rabbis .abortRabbis {\\n color: black !important;\\n font-weight: bold; }\\n\\n#formatIcons {\\n flex-shrink: 0; }\\n\\n#formatIcons mat-icon {\\n margin: 0 2px; }\\n\\n.arrow_box {\\n position: relative; }\\n\\n.arrow_box:after, .arrow_box:before {\\n top: 50%;\\n border: solid transparent;\\n content: \\\" \\\";\\n height: 0;\\n width: 0;\\n position: absolute;\\n pointer-events: none; }\\n\\n:host-context(.LangHE) .arrow_box:after, :host-context(.LangHE) .arrow_box:before {\\n right: 100%; }\\n\\n:host-context(.LangEN) .arrow_box:after, :host-context(.LangEN) .arrow_box:before {\\n left: 100%; }\\n\\n.arrow_box:after {\\n border-color: rgba(255, 255, 255, 0); }\\n\\n:host-context(.LangHE) .arrow_box:after {\\n border-right-color: #ffffff; }\\n\\n:host-context(.LangEN) .arrow_box:after {\\n border-left-color: #ffffff; }\\n\\n:host-context(.LangHE) .arrow_box:after {\\n border-width: 12px;\\n margin-top: -12px; }\\n\\n:host-context(.LangEN) .arrow_box:after {\\n border-width: 9px;\\n margin-top: -9px; }\\n\\n.arrow_box:before {\\n border-color: rgba(194, 225, 245, 0); }\\n\\n:host-context(.LangHE) .arrow_box:before {\\n border-right-color: black; }\\n\\n:host-context(.LangEN) .arrow_box:before {\\n border-left-color: black; }\\n\\n:host-context(.LangHE) .arrow_box:before {\\n border-width: 13px;\\n margin-top: -13px; }\\n\\n:host-context(.LangEN) .arrow_box:before {\\n border-width: 10px;\\n margin-top: -10px; }\\n\\n.audio-icon .cls-2 {\\n fill: #005e98; }\\n\\n.paper-icon .cls-2 {\\n fill: #ffffff; }\\n\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbGVzc29ucy9maWx0ZXItc3VtbWFyeS9DOlxccHJvamVjdHNcXFllc2hpdmEtVjMtR2l0LVByb2RcXFNpdGUgdjNcXFNpdGVQcm9qZWN0c1xcbWlkcmFzaEFuZ3VsYXIvc3JjXFxhcHBcXGxlc3NvbnNcXGZpbHRlci1zdW1tYXJ5XFxmaWx0ZXItc3VtbWFyeS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvbGVzc29ucy9maWx0ZXItc3VtbWFyeS9DOlxccHJvamVjdHNcXFllc2hpdmEtVjMtR2l0LVByb2RcXFNpdGUgdjNcXFNpdGVQcm9qZWN0c1xcbWlkcmFzaEFuZ3VsYXIvQ29udGVudFxcTWlkcmFzaEFuZ3VsYXJJbml0LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7RUFDSSxhQUFhO0VBQ2IsOEJBQThCO0VBQzlCLGFBQWEsRUFBQTs7QUFHakI7RUFDSSxhQUFhO0VBQ2IsZUFBZSxFQUFBOztBQUZuQjtJQUtRLGNBQWM7SUFDZCx5QkFBd0I7WUFBeEIsd0JBQXdCLEVBQUE7O0FBTmhDO0lBVUksdUJBQXVCO0lBQ3ZCLG1CQUFtQjtJQUNuQixZQUFZO0lBQ1osWUFBWSxFQUFBOztBQWJoQjtNQWdCUSxxQkFBb0I7Y0FBcEIsb0JBQW9CO01BQ3BCLDBCQUF5QjtjQUF6Qix5QkFBeUI7TUFDekIseUJBQXdCO2NBQXhCLHdCQUF3Qix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LWNvbnRleHQoLkxhbmdFTikgJntib3JkZXItbGVmdC1jb2xvcjogJGNvbG9yO31cclxufVxyXG5cclxuQG1peGluIGJvcmRlckNvbG9yUnRsTGVmdCgkY29sb3IpIHtcclxuICAgIDpob3N0LWNvbnRleHQoLkxhbmdIRSkgJntib3JkZXItbGVmdC1jb2xvcjogJGNvbG9yO31cclxuICAgIDpob3N0LWNvbnRleHQoLkxhbmdFTikgJntib3JkZXItcmlnaHQtY29sb3I6ICRjb2xvcjt9XHJcbn1cclxuXHJcblxyXG5AbWl4aW4gYm9yZGVyUnRsUmlnaHQoJGJvcmRlcikge1xyXG4gICAgOmhvc3QtY29udGV4dCguTGFuZ0hFKSAme2JvcmRlci1yaWdodDogJGJvcmRlcjt9XHJcbiAgICA6aG9zdC1jb250ZXh0KC5MYW5nRU4pICZ7Ym9yZGVyLWxlZnQ6ICRib3JkZXI7fVxyXG59XHJcblxyXG5AbWl4aW4gYm9yZGVyUnRsTGVmdCgkYm9yZGVyKSB7XHJcbiAgICA6aG9zdC1jb250ZXh0KC5MYW5nSEUpICZ7Ym9yZGVyLWxlZnQ6ICRib3JkZXI7fVxyXG4gICAgOmhvc3QtY29udGV4dCguTGFuZ0VOKSAme2JvcmRlci1yaWdodDogJGJvcmRlcjt9XHJcbn1cclxuIl19 */\"","import { Component, OnInit, Input, OnDestroy } from '@angular/core';\r\nimport { LessonsFilter } from '../lessons-filter';\r\nimport { RavService } from '../../ravs/rav.service';\r\nimport { midrashAngular, YeshivaModels } from '../../serverTypes/yeshivaTypes';\r\nimport { MatIconRegistry } from '@angular/material';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n\r\nimport '../../../assets/svg/video/filt-selected.svg'\r\nimport { AppStoreService, Tabs } from '../../app-store.service';\r\nimport { LessonsFilterService } from '../lessons-filter-service';\r\nimport { Subscription } from 'rxjs';\r\nimport { I18n } from '@ngx-translate/i18n-polyfill';\r\n\r\n@Component({\r\n selector: 'filter-summary',\r\n templateUrl: './filter-summary.component.html',\r\n styleUrls: ['./filter-summary.component.scss']\r\n})\r\nexport class FilterSummaryComponent implements OnInit, OnDestroy {\r\n\r\n @Input() public filterService: LessonsFilterService;\r\n\r\n public filter: LessonsFilter;\r\n private filterSubscription : Subscription;\r\n\r\n public rabbis: YeshivaModels.BE.RabbiCount[];\r\n\r\n constructor(private rabbisService: RavService,\r\n private appStore: AppStoreService,\r\n private i18n: I18n\r\n ) {\r\n \r\n }\r\n\r\n ngOnInit() {\r\n this.filterSubscription = this.filterService.filterChanges.subscribe(newfilter => {\r\n this.filter = newfilter;\r\n\r\n if(!this.filter.catId){\r\n //not in cat page - show main navLinks\r\n this.appStore.setMainNavLinks();\r\n }\r\n \r\n if (this.filter.filtRabbis.length > 0) {\r\n this.rabbisService.getRavsListWithLessonsNumber().then(\r\n rabbis => {\r\n this.rabbis = rabbis.filter(rabbi => this.filter.filtRabbis.includes(rabbi.Id));\r\n }\r\n\r\n );\r\n }\r\n \r\n } );\r\n\r\n \r\n }\r\n\r\n ngOnDestroy(){\r\n this.filterSubscription.unsubscribe();\r\n }\r\n\r\n\r\n public openFilterPanel(){\r\n this.appStore.showTab(Tabs.filter);\r\n }\r\n\r\n public openRabbisPanel(){\r\n this.appStore.showTab(Tabs.rabbis);\r\n }\r\n\r\n public removeRabbis(){\r\n this.filter.filtRabbis = [];\r\n this.filterService.setFilter(this.filter);\r\n }\r\n\r\n public removeRabbi(rabbi:YeshivaModels.BE.RabbiCount){\r\n this.filter.filtRabbis.splice(this.filter.filtRabbis.indexOf(rabbi.Id),1);\r\n this.filterService.setFilter(this.filter);\r\n }\r\n\r\n}\r\n","import { I18n } from '@ngx-translate/i18n-polyfill';\r\nimport { Component, OnInit, Input, Inject } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { AppGlobalsModule } from \"../app-globals.module\"\r\n\r\nimport { Lesson } from \"./lesson\";\r\nimport { FilteredLessonsService } from \"./filtered-lessons.service\";\r\nimport { LessonsFilterService } from \"./lessons-filter-service\"\r\nimport { Subscription } from \"rxjs\";\r\nimport { LessonsFilter } from \"./lessons-filter\";\r\nimport { DownloadService } from \"../download.service\";\r\nimport { LoaderService } from \"../core/services/loader/loader.service\";\r\nimport { LoaderInterceptor } from \"../core/services/loader/loader.interceptor\";\r\n\r\n\r\n@Component({\r\n selector: \"filteredlessons\",\r\n templateUrl: '../../../views/MidrashPartialView/Lessons.html',\r\n styleUrls: ['../../../content/lessons.component.scss'],\r\n providers: [ FilteredLessonsService ]\r\n})\r\nexport class FilteredLessonsComponent implements OnInit {\r\n\r\n selectedLesson: Lesson;\r\n lessons: Lesson[];\r\n private lessonSubscription: Subscription;\r\n private filterSubscription: Subscription;\r\n private lessonOnFetch:number = 20;\r\n\r\n //set fixed values for the lessons in this component\r\n @Input() title: string = this.i18n({value:\"שיעורים\", id:\"lessons\"});\r\n @Input() description: string = \"\";\r\n\r\n private _fixFilter: LessonsFilter;\r\n\r\n //set the fixed filter on the service - can be changed during the component life\r\n @Input() set fixFilter(fixFilter: LessonsFilter){\r\n this._fixFilter = fixFilter;\r\n this.lessonService.updateFixedFilter(this._fixFilter);\r\n }\r\n\r\n\r\n constructor(\r\n private downloadService: DownloadService,\r\n @Inject(FilteredLessonsService) private lessonService: FilteredLessonsService,\r\n private filterService: LessonsFilterService,\r\n private loaderService: LoaderService,\r\n private router: Router,\r\n private i18n: I18n) {\r\n // The injector may return array instead direct object sometimes due to inherit bug\r\n if (lessonService instanceof Array) {\r\n this.lessonService = this.lessonService[0];\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n //promise system\r\n //this.getLessons();\r\n\r\n //observable system:\r\n //subscribe for filtered lessons stor:\r\n\r\n //start watch on the general filter\r\n this.lessonService.subscribeToGeneralFilter();\r\n\r\n //subscribe to get changes according to filter changes\r\n this.lessonSubscription = this.lessonService.filteredLessons.subscribe(_lessons => {\r\n this.lessons = _lessons;\r\n })\r\n\r\n //subscribe for changes in filter\r\n this.filterSubscription = this.filterService.filterChanges.subscribe(\r\n //when new filter is applied refresh the lessons from the service\r\n updatedFilter => {\r\n //console.log(\"lessons component:\\n filterChanged\");\r\n //console.log(updatedFilter);\r\n }\r\n )\r\n }\r\n\r\n ngOnDestroy() {\r\n if(this.lessonSubscription){\r\n this.lessonSubscription.unsubscribe();\r\n }\r\n if(this.filterSubscription){\r\n this.filterSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n onSelect(lesson: Lesson): void {\r\n this.selectedLesson = lesson;\r\n }\r\n\r\n // getLessons(): void {\r\n // this.lessonService.getLessons(this.filterService.getAppliedFilter())\r\n // .subscribe(resultslessons => this.lessons = resultslessons);\r\n // }\r\n\r\n gotoDetail(): void {\r\n this.router.navigate([\"/detail\", this.selectedLesson.Id]);\r\n }\r\n\r\n\r\n loadMore(){\r\n this.lessonService.fetchMoreFilteredLessons(this.lessonOnFetch);\r\n }\r\n\r\n\r\n /*\r\n *@Deprected\r\n */\r\n onScrollDown() {\r\n //TODO: check if 0 lessons fetched - conitnue to fetch\r\n this.lessonService.fetchMoreFilteredLessons(this.lessonOnFetch)\r\n }\r\n\r\n //onScrollUp() {\r\n // console.log('scrolled up!!')\r\n //}\r\n\r\n downloadAll(){\r\n this.downloadService.downloadAllFiles(this.lessons);\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core'\r\nimport { Subject, Observable, of, BehaviorSubject, Subscription } from 'rxjs';\r\n\r\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\r\n//TODO: some of those can be delelted (workes with promises)\r\nimport { Headers } from '@angular/http'\r\nimport { catchError, map, tap, filter } from 'rxjs/operators';\r\n\r\n\r\nimport { AppGlobalsModule } from '../app-globals.module';\r\n\r\nimport { LessonsFilter } from './lessons-filter';\r\n\r\nimport { Lesson } from './lesson';\r\n\r\nimport { LessonsFilterService } from './lessons-filter-service';\r\nimport { midrashAngular } from '../serverTypes/yeshivaTypes';\r\nimport { BackenAccessService } from '../shared/backend-access.service';\r\nimport { CurrentService } from '../home/current.service';\r\nimport { ErrorsService } from '../core/errors/errors-service/errors.service';\r\n\r\n//Data service for the filtered lessons component\r\n//work with the filters system to fetch and display filtered lessons\r\n//combine use of the global filter of the application together with a fixed parameters filter that can rule the service and overcame the global filter\r\n//TODO - seppreate the backend calls into a backend service that will include cache data and generic api calls\r\n@Injectable()\r\nexport class FilteredLessonsService implements OnDestroy {\r\n //the webApi fake msodule is chaking for the action name included in its mock data,here it's \"lessons\"\r\n //the \"contoler\", here \"api\" isn't importent name\r\n\r\n private filterSubscription: Subscription;\r\n //public histogramStatistic: LessonsStatistics;\r\n private dataRequested = false;\r\n\r\n protected contentUrl = AppGlobalsModule.apiPath(\"lessons\");\r\n protected currentFilter: LessonsFilter;\r\n protected _filteredLessons: BehaviorSubject = new BehaviorSubject([]);\r\n protected currentDataSubscription: Subscription;\r\n\r\n //give option to know if the user can load more lessons\r\n public allLessonsLoaded = false;\r\n\r\n public fixedFilter: LessonsFilter;\r\n public readonly filteredLessons: Observable = this._filteredLessons.asObservable();\r\n public readonly size: number = 20;\r\n public page: number = 1;\r\n\r\n constructor(protected http: HttpClient,\r\n protected lessonsFilterService: LessonsFilterService,\r\n protected backendAccessService: BackenAccessService,\r\n protected currentDataService: CurrentService,\r\n protected errorsService: ErrorsService) {\r\n this.currentFilter = new LessonsFilter();\r\n //default filter - dosn't enforce any filter\r\n this.fixedFilter = new LessonsFilter();\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.filterSubscription)\r\n {\r\n this.filterSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n subscribeToGeneralFilter() {\r\n //subscribe to the filter service Subject\r\n this.filterSubscription = this.lessonsFilterService.filterChanges.subscribe(\r\n //the initail Subject filter is null\r\n //here, the last filter or the initial filter will be returned (BehaviorSubject)\r\n filter => {\r\n if (!this.dataRequested || (this.lessonsFilterService.filterApplied && this.isfilterChange(filter))) {\r\n this.currentFilter = this.fixedFilter.combaineFixedFilterWithGeneralFilter(filter)\r\n this.updateFillteredLessons(this.size, this.currentFilter)\r\n }\r\n }\r\n )\r\n\r\n }\r\n\r\n\r\n private setFixedFilter(fixFilter: LessonsFilter) {\r\n this.fixedFilter = fixFilter;\r\n if (!this.lessonsFilterService.filterApplied) {\r\n this.currentFilter = this.fixedFilter;\r\n }\r\n else {\r\n this.currentFilter = this.fixedFilter.combaineFixedFilterWithGeneralFilter(this.currentFilter)\r\n }\r\n }\r\n\r\n public initFixedFilter(fixFilter: LessonsFilter) {\r\n this.setFixedFilter(fixFilter);\r\n }\r\n\r\n updateFixedFilter(fixFilter: LessonsFilter) {\r\n this.setFixedFilter(fixFilter);\r\n this.updateFillteredLessons(this.size);\r\n }\r\n\r\n\r\n\r\n isfilterChange(newFilter: LessonsFilter): boolean {\r\n if (newFilter == null && this.currentFilter != null) {\r\n //if the new filter is null - update current to default\r\n return true\r\n }\r\n return this.currentFilter.updateNedeed(newFilter, this.fixedFilter);\r\n }\r\n\r\n // getLessonsWithPrommise(LessonsFilter: LessonsFilter = null, top:number = -1, skip:number = -1): Promise {\r\n // //return Promise.resolve(LESSONS);\r\n // return this.http.get(this.lessonsUrl+\"?$top=\"+top+\",&$skip=\"+skip)\r\n // .toPromise()\r\n // .then(response => response.json() as Lesson[])\r\n // .catch(this.handleError);\r\n // }\r\n\r\n getLessonsAsObservable(lessonsFilter: LessonsFilter = null, top: number = -1, skip: number = -1): Observable {\r\n if (lessonsFilter == null) {\r\n return this.http.get(this.contentUrl + \"?$top=\" + top + \",&$skip=\" + skip)\r\n .pipe(\r\n tap(heroes => this.log(`fetched lessons`)),\r\n catchError(this.handleError('getLessons', []))\r\n );\r\n }\r\n\r\n //needs to apply LessonsFilter:\r\n // Add safe, URL encoded search parameter if there is a search term\r\n const options = lessonsFilter ?\r\n {\r\n params: new HttpParams().set('video', String(lessonsFilter.filtVideo))\r\n .set('audio', String(lessonsFilter.filtAudio))\r\n .set('pdf', String(lessonsFilter.filtPDF))\r\n .set('rabbis', String(lessonsFilter.filtRabbis))\r\n }\r\n : {};\r\n return this.http.get(this.contentUrl + \"?$top=\" + top + \",&$skip=\" + skip, options)\r\n .pipe(\r\n map(lessons => lessons.filter(lesson => lessonsFilter.validForFilter(lesson))),\r\n tap(heroes => this.log(`fetched lessons`)),\r\n catchError(this.handleError('getLessons', []))\r\n );\r\n }\r\n\r\n protected defaultFilter(size:number) {\r\n return this.http.get(this.contentUrl + '?size=' + size)\r\n .pipe(\r\n tap(lessons => {\r\n this.log(`updated lessons without filter`)\r\n }),\r\n catchError(this.handleError('updateFillteredLessons', []))\r\n );\r\n\r\n this.dataRequested = true;\r\n }\r\n\r\n protected defaultContent(size: number,\r\n options: {params: HttpParams; },\r\n lessonsFilter: LessonsFilter):\r\n Observable {\r\n return this.http.get(this.contentUrl + '?size=' + size, options)\r\n .pipe(\r\n map(lessons => lessons.filter(lesson => lessonsFilter.validForFilter(lesson))),\r\n catchError(this.handleError('updateFillteredLessons', []))\r\n );\r\n }\r\n\r\n //TODO - return a Promise\r\n protected updateFillteredLessons(size: number = 20, lessonsFilter: LessonsFilter = this.currentFilter) {\r\n this.page = 1;\r\n this.unsubscribeFromPreviuosObservable();\r\n this.allLessonsLoaded = false;\r\n\r\n //create http observable for new request\r\n let filteredLessons: Observable;\r\n if (lessonsFilter == null) {\r\n filteredLessons = this.defaultFilter(size);\r\n }\r\n // If data already fetched on homepage\r\n else if (lessonsFilter.homepageFirstPage &&\r\n lessonsFilter.orderBy === midrashAngular.API.enums.OrderBy.popularity) {\r\n // TODO: need to add role to LatestLessons\r\n\r\n // Get pupolarity from Current service\r\n filteredLessons = this.currentDataService.getPopularLessons();\r\n this.dataRequested = true;\r\n }\r\n else {\r\n //Apply LessonsFilter:\r\n let options = { params: this.backendAccessService.filterToAPIParameters(lessonsFilter) }\r\n\r\n filteredLessons = this.defaultContent(size, options, lessonsFilter);\r\n\r\n this.dataRequested = true;\r\n }\r\n\r\n //assign the results to the service sotred Subject of lessons\r\n this.currentDataSubscription = filteredLessons.subscribe(\r\n lessons => {\r\n this._filteredLessons.next(lessons);\r\n }\r\n );\r\n\r\n }\r\n\r\n\r\n //TODO - change to return a promise that will fire when the fetch finish\r\n fetchMoreFilteredLessons(size: number = 20,\r\n lessonsFilter: LessonsFilter = this.currentFilter\r\n ) {\r\n this.unsubscribeFromPreviuosObservable();\r\n //TODO: deal with float numbers\r\n let page = this.page + 1;\r\n let pagingUrl = this.contentUrl + \"?size=\" + size + \"&page=\" + page;\r\n //create http observabel for new request\r\n let filteredLessons: Observable;\r\n if (lessonsFilter == null) {\r\n filteredLessons = this.http.get(pagingUrl)\r\n .pipe(\r\n tap(lessons => this.log(`fetched lessons with null filter`)),\r\n catchError(this.handleError('updateFillteredLessons', []))\r\n );\r\n }\r\n else {\r\n //needs to apply LessonsFilter:\r\n var options = { params: this.backendAccessService.filterToAPIParameters(lessonsFilter) }\r\n\r\n filteredLessons = this.http.get(pagingUrl, options)\r\n .pipe(\r\n map(lessons => lessons.filter(lesson => lessonsFilter.validForFilter(lesson))),\r\n tap(lessons => {\r\n this.log(`fetched lessons with filter`);\r\n this.page++;\r\n }),\r\n catchError(this.handleError('updateFillteredLessons', []))\r\n );\r\n }\r\n\r\n //assign the results to the service sotred Subject of lessons\r\n this.currentDataSubscription = filteredLessons.subscribe(\r\n nextLessons => {\r\n if (nextLessons.length < size) {\r\n this.allLessonsLoaded = true;\r\n }\r\n this._filteredLessons.next(this._filteredLessons.getValue().concat(nextLessons));\r\n }\r\n )\r\n\r\n }\r\n\r\n unsubscribeFromPreviuosObservable(): any {\r\n if (this.currentDataSubscription) {\r\n this.currentDataSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n\r\n\r\n /**\r\n * Handle HttpClient operation that failed.\r\n * Let the app continue.\r\n * @param operation - name of the operation that failed\r\n * @param result - optional value to return as the observable result\r\n */\r\n protected handleError(operation = 'operation', result?: T) {\r\n return (error: any): Observable => {\r\n\r\n // TODO: send the error to remote logging infrastructure\r\n //console.error(error); // log to console instead\r\n this.errorsService.log(error);\r\n // TODO: better job of transforming error for user consumption\r\n //this.log(`${operation} failed: ${error.message}`);\r\n\r\n // Let the app keep running by returning an empty result.\r\n return of(result as T);\r\n };\r\n }\r\n\r\n /** Log a HeroService message with the MessageService */\r\n private log(message: string) {\r\n //console.log(message);\r\n }\r\n\r\n public getFilteredLessonsHistogram(lessonsFilter: LessonsFilter = this.currentFilter): Observable {\r\n //LessonsStatisticsController lsc = new\r\n var options = { params: this.backendAccessService.filterToAPIParameters(lessonsFilter) }\r\n var histogramUrl = AppGlobalsModule.apiPath(\"LessonsStatistics\");\r\n return this.http.get(histogramUrl, options)\r\n .pipe(\r\n catchError(this.handleError('getFilteredLessonsHistogram', []))\r\n );\r\n }\r\n\r\n}\r\n","import { Component, Input, OnInit } from \"@angular/core\"\r\nimport { LessonsFilter } from \"./lessons-filter\";\r\n\r\nimport {midrashAngular} from '../serverTypes/yeshivaTypes'\r\n\r\n\r\n@Component({\r\n selector:'latestLessons',\r\n template:''\r\n})\r\nexport class LatestLessonsComponent implements OnInit{\r\n public latestFilter:LessonsFilter;\r\n\r\n ngOnInit(){\r\n // TODO: Need to fetch the first page of homepage from current like we did in @RecomandedLessonsComponent\r\n this.latestFilter = new LessonsFilter();\r\n this.latestFilter.orderBy = midrashAngular.API.enums.OrderBy.dateUp;\r\n //main catid - all categories\r\n this.latestFilter.catId = 0; \r\n this.latestFilter.filtRabbis = [-1];\r\n }\r\n}","import { Component, ViewEncapsulation, Input, OnInit, AfterViewInit, ViewChildren,\r\n AfterViewChecked, ViewChild,HostListener, ElementRef, Renderer2, ComponentRef, QueryList, OnDestroy } from '@angular/core';\r\nimport { ActivatedRoute, ParamMap, Router, NavigationStart, NavigationEnd } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { AppGlobalsModule } from '../app-globals.module';\r\nimport { SharedModule } from '../shared/shared.module';\r\n\r\nimport { DomSanitizer, SafeResourceUrl, SafeStyle, SafeHtml } from '@angular/platform-browser';\r\n\r\nimport { switchMap, first } from 'rxjs/operators';\r\n\r\nimport { Lesson } from './lesson';\r\nimport { FilteredLessonsService } from './filtered-lessons.service';\r\nimport { AppStoreService, HeaderType } from '../app-store.service';\r\nimport { LessonService } from './lesson.service';\r\nimport { RepliesService } from './replies.service';\r\nimport { ErrorsService } from '../core/errors/errors-service/errors.service';\r\nimport { midrashAngular, YeshivaModels } from '../serverTypes/yeshivaTypes';\r\nimport { CategoryService } from '../category/category.service';\r\nimport { SeriesService } from '../series/series.service';\r\nimport { SeriesPreviewComponent } from '../series/series-preview.component';\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport { LoaderService } from '../core/services/loader/loader.service';\r\nimport { I18n } from '@ngx-translate/i18n-polyfill';\r\nimport { getHostElement } from '@angular/core/src/render3';\r\n\r\nlet RepliesSystem: any; // This will initiate dynamicaly\r\n\r\ndeclare var nIDate: any;\r\ndeclare var $: any;\r\n\r\n\r\n@Component({\r\n selector: 'lesson-detail',\r\n templateUrl: '../../../views/MidrashPartialView/lesson-detail.html',\r\n styleUrls: ['../../../content/lesson-detail.component.scss', '../../../../../Content/css/Replies.min.css'],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class LessonDetailComponent implements OnInit, AfterViewChecked, OnDestroy {\r\n globals = AppGlobalsModule;\r\n\r\n @Input() lesson: Lesson;\r\n\r\n public lessonContent: SafeHtml = null;\r\n public lessonCategory: YeshivaModels.BE.Category = null;\r\n public lessonSeries: YeshivaModels.BE.Series = null;\r\n public numberInSeries: number = null;\r\n\r\n replies: any;\r\n private repliesLoaded: boolean;\r\n listnToPrintBtn: boolean = false;\r\n\r\n @ViewChild('contentBody') contentBody: ElementRef;\r\n @ViewChild('sp', { read: ElementRef }) seriesPreview: ElementRef;\r\n\r\n\r\n public isPlaying: boolean = false;\r\n\r\n @ViewChildren('player') players: QueryList;\r\n\r\n private stopPlayerSubscription: Subscription;\r\n\r\n public dedication: boolean = false;\r\n\r\n\r\n private seriesPreviewInjected;\r\n dedicationDescription: string;\r\n\r\n private islessonContentEdited;\r\n\r\n //enable fragment routing and jumping for footnots\r\n private fragment: string;\r\n private scrollToFragmentWhenViewCheck: any = false;\r\n\r\n public videoLink: string;\r\n\r\n constructor(\r\n public appStore: AppStoreService,\r\n public loaderService: LoaderService,\r\n private lessonService: LessonService,\r\n private repliesService: RepliesService,\r\n private categoryService: CategoryService,\r\n private seriesService: SeriesService,\r\n private errorsService: ErrorsService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private location: Location,\r\n private sanitizer: DomSanitizer,\r\n private elementRef: ElementRef,\r\n private renderer: Renderer2,\r\n private i18n: I18n\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.route.paramMap.pipe(\r\n switchMap((params: ParamMap) => this.lessonService.getLesson(+params.get('id')))\r\n ).subscribe(lessonTuple => {\r\n //need to clear previous data when load a new lesson immiditly affter another\r\n this.lessonSeries = null;\r\n this.numberInSeries = null;\r\n\r\n this.lesson = lessonTuple.Shiur;\r\n this.lessonCategory = lessonTuple.Category;\r\n\r\n\r\n // //update lesson counter in server DB\r\n this.lessonService.updateLessonCounter(this.lesson);\r\n\r\n if (this.lesson.Video) {\r\n this.videoLink = this.getVideoLink();\r\n }\r\n\r\n\r\n //trust the content html to run styles and scripts that included\r\n if(lessonTuple.Content && lessonTuple.Content != ''){\r\n this.lessonContent = this.sanitizer.bypassSecurityTrustHtml(lessonTuple.Content);\r\n }\r\n\r\n this.appStore.updateDisplayTitle(this.lesson.Title);\r\n this.appStore.setPageTitle(this.lesson.Title);\r\n this.appStore.headerType = HeaderType.lesson;\r\n this.appStore.navLinks = []\r\n\r\n //set the lesson dedication\r\n if (this.lesson.Dedication != null && this.lesson.Dedication !== '') {\r\n this.dedication = true;\r\n this.dedicationDescription = this.dedicationDescriptionText(this.lesson.DedicationType as midrashAngular.API.enums.DedicateType);\r\n }\r\n\r\n //get lesson series\r\n //TODO: FIXME: needs to check also cat2 --- NO! lesson should have only 1 category and 1 series\r\n if (this.lessonCategory.IsSeries) {\r\n //fetch complete series data and lessons\r\n this.populateLessonSeries(this.lessonCategory.Id);\r\n }\r\n this.seriesPreviewInjected = false;\r\n\r\n\r\n this.isPlaying = false;\r\n\r\n this.islessonContentEdited = false;\r\n\r\n if(this.players){\r\n this.players.forEach(player => {\r\n player.nativeElement.load();\r\n //TODO:if no content - auto-play (autoplay attribute is working in inner navigation, add support for first page)\r\n //not working because players undefined\r\n // if( this.lessonContent == null){\r\n // player.nativeElement.play();\r\n // }\r\n });\r\n }\r\n\r\n // We don't want to show replies in the server.\r\n if (!AppGlobalsModule.isServer) {\r\n\r\n // Load replies modul dynamically\r\n import('../../../../../Content/scripts/Yeshiva/replies.js')\r\n .then((replies) => {\r\n //console.log(replies);\r\n RepliesSystem = replies;\r\n\r\n // After we have lessons Id get the lesson's replies\r\n this.route.paramMap.pipe(\r\n () => this.repliesService.getReplies(this.lesson.Id)\r\n ).subscribe(replies => {\r\n var arr = [];\r\n\r\n replies.forEach(function (element) {\r\n arr.push(new RepliesSystem.Replies.Reply(element.Topic, element.Id, element.Title, element.Name, element.City,\r\n element.Date.toString().split('T')[0], // Show only the first part of the string\r\n element.Content, element.Item, element.Linear, element.Indent));\r\n });\r\n this.replies = new RepliesSystem.Replies(midrashAngular.API.enums.ReplyType.SHIUR, this.lesson.Id, arr);\r\n\r\n this.repliesLoaded = false;\r\n }\r\n );\r\n });\r\n }\r\n },\r\n error => {\r\n this.errorsService.notfoundError(error);\r\n }\r\n );\r\n\r\n this.stopPlayerSubscription = this.router.events.subscribe(ev => {\r\n if (ev instanceof NavigationStart) {\r\n //stop all media players\r\n this.players.forEach(player => {\r\n player.nativeElement.pause();\r\n });\r\n }\r\n })\r\n }\r\n\r\n\r\n dedicationDescriptionText(Dedication: midrashAngular.API.enums.DedicateType): string {\r\n let res: string;\r\n\r\n switch (Dedication) {\r\n case midrashAngular.API.enums.DedicateType.MEMORY:\r\n res = 'מוקדש לעלוי נשמת';\r\n break;\r\n case midrashAngular.API.enums.DedicateType.RECOVER:\r\n res = 'מוקדש לרפואת';\r\n break;\r\n case midrashAngular.API.enums.DedicateType.HONOR:\r\n res = 'מוקדש להצלחת';\r\n break;\r\n case midrashAngular.API.enums.DedicateType.eMEMORY:\r\n res = 'Dedicated to the memory of';\r\n break;\r\n case midrashAngular.API.enums.DedicateType.eRECOVER:\r\n res = 'Dedicated to the speedy recovery of';\r\n break;\r\n case midrashAngular.API.enums.DedicateType.eHONOR:\r\n res = 'Dedicated in honor of';\r\n break;\r\n case midrashAngular.API.enums.DedicateType.OTHER:\r\n res = this.i18n({ value: 'אחר', id: 'other' });\r\n break;\r\n default:\r\n break;\r\n }\r\n return res;\r\n }\r\n\r\n ngOnDestroy() {\r\n this.stopPlayerSubscription.unsubscribe();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.route.fragment.subscribe(fragment => {\r\n this.scrollToFragment(fragment);\r\n });\r\n }\r\n\r\n scrollToFragment(fragment) {\r\n try {\r\n //try to find by id\r\n var fregElement = document.querySelector('#' + fragment);\r\n } catch (e) {\r\n\r\n }\r\n\r\n if (!fregElement) {\r\n fregElement = document.querySelector('[name=\"' + fragment + '\"]');\r\n }\r\n\r\n if (fregElement) {\r\n fregElement.scrollIntoView();\r\n this.scrollToFragmentWhenViewCheck = false;\r\n }\r\n else {\r\n this.fragment = fragment;\r\n this.scrollToFragmentWhenViewCheck = true;\r\n }\r\n\r\n }\r\n\r\n ngAfterViewChecked(): void {\r\n //for text lesson - find hooks to paragrphs in the text\r\n if (this.lessonContent != null && this.lessonContent != '' && !this.islessonContentEdited) {\r\n //add router link to footnots\r\n //let headnotes: any[] = this.contentBody.nativeElement.querySelectorAll('.headnote');\r\n let footnotes: any[] = this.contentBody.nativeElement.querySelectorAll('.footnote,.headnote');\r\n\r\n footnotes.forEach(headnote => {\r\n //set nevigation to anchor\r\n headnote.addEventListener('click', (ev) => {\r\n //abort regular link\r\n ev.preventDefault();\r\n //navigate by fragment\r\n this.router.navigate([], { fragment: headnote.hash.replace('#', '') });\r\n });\r\n });\r\n\r\n\r\n\r\n\r\n this.islessonContentEdited = true;\r\n\r\n }\r\n\r\n //series preview inside html body\r\n if (!this.seriesPreviewInjected && this.seriesPreview != null) {\r\n //TODO: add logic to set the series preview affter minimal height of content\r\n let firstHook: Node = this.contentBody.nativeElement.querySelectorAll('br,p').item(0);\r\n if (firstHook) {\r\n this.renderer.insertBefore(this.contentBody.nativeElement, this.seriesPreview.nativeElement, firstHook.nextSibling);\r\n }\r\n\r\n this.seriesPreviewInjected = true;\r\n }\r\n\r\n //drew replies system\r\n if (this.replies && !this.repliesLoaded) {\r\n this.writeComments();\r\n this.repliesLoaded = true;\r\n }\r\n\r\n //replace print button click - to open old preint version:\r\n if(!this.listnToPrintBtn){\r\n //is the element exist?\r\n var printBtn = document.getElementById('RepliesPrint');\r\n if(printBtn){\r\n //remove the print listener by cloning the node (uf you have better crose browser way to do it - go for it!)\r\n var new_printBtn = printBtn.cloneNode(true);\r\n printBtn.parentNode.replaceChild(new_printBtn, printBtn);\r\n\r\n //add the click event listener:\r\n this.renderer.listen(new_printBtn, 'click', () =>{\r\n document.open('/midrash/printShiur.aspx?id=' + this.lesson.Id, null,null, false);\r\n });\r\n\r\n //flag it as done\r\n this.listnToPrintBtn = true;\r\n }\r\n }\r\n\r\n if (this.scrollToFragmentWhenViewCheck) {\r\n this.scrollToFragment(this.fragment);\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n async populateLessonSeries(seriesId: any) {\r\n this.lessonSeries = await this.seriesService.getSeries(seriesId);\r\n //find the lesson place in series\r\n this.numberInSeries = 1 + this.lessonSeries.Lessons.findIndex(lesson => lesson.Id == this.lesson.Id);\r\n }\r\n\r\n\r\n goBack(): void {\r\n this.location.back();\r\n }\r\n\r\n play(): void {\r\n this.isPlaying = true;\r\n }\r\n\r\n pause(): void {\r\n this.isPlaying = false;\r\n }\r\n\r\n stop(): void {\r\n this.isPlaying = false;\r\n }\r\n\r\n public picForLesson(bigSize: boolean = false): SafeStyle {\r\n return this.sanitizer.bypassSecurityTrustUrl(Lesson.image(this.lesson,bigSize));\r\n\r\n }\r\n\r\n public origianlRabbiImage(): SafeStyle {\r\n //this regex will take /SiteProjects/YeshivaModels/Logic/Images/spriteRszRound.aspx?pic=R-emelamed.jpg&v=20181128034241 as input\r\n //and will convert to \"url(/images/rabanim/emelamed.jpg?v=20181128034241\" as output\r\n let originalUrl = this.lesson.RabbiPicture;\r\n return this.sanitizer.bypassSecurityTrustStyle('url('+ \r\n originalUrl.replace('/SiteProjects/YeshivaModels/Logic/Images/spriteRszRound.aspx?pic=R-','/images/rabanim/')\r\n .replace('&v=','?v=')\r\n + ')');\r\n }\r\n\r\n public getVideoLink() {\r\n //TODO: use DB parameters to decide on file extantion - can be wmv for old video files\r\n let fileExt = 'mp4';\r\n return AppGlobalsModule.mediaPath() + this.lesson.Filename[0] + '/' + this.lesson.Filename + '150' + '.' + fileExt;\r\n }\r\n\r\n public get audioLink() {\r\n return AppGlobalsModule.mediaPath() + this.lesson.Filename[0] + '/' + this.lesson.Filename + '.mp3';\r\n }\r\n\r\n public get pdfLink() {\r\n let pdfDir = Math.floor(this.lesson.Id / 100);\r\n return '/general/pdfView.aspx?src=/midrash/pdf/pdf' + pdfDir + '/' + this.lesson.Filename + '.pdf';\r\n }\r\n\r\n public writeComments() {\r\n this.replies.Write($('#replies'), midrashAngular.API.enums.ReplyType.SHIUR);\r\n }\r\n\r\n public scrollToReplies() {\r\n let repliesElement = document.querySelector('#secondarytopButtons');\r\n if (repliesElement) {\r\n repliesElement.scrollIntoView({ behavior: 'smooth' });\r\n }\r\n }\r\n\r\n public open_grrin() {\r\n //TODO - open in angular with CDK\r\n window.open('/siteprojects/lvideo/grrin/', '_NewWindow_Rohr_',\r\n 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=400,height=400');\r\n }\r\n}\r\n\r\n\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\n\r\nimport { Observable , Subject , of} from 'rxjs';\r\nimport { AppGlobalsModule } from '../app-globals.module'\r\n\r\n\r\n\r\n// Observable operators\r\nimport { catchError, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';\r\n\r\n\r\nimport { LessonSearchService } from './lesson-search.service'\r\nimport { Lesson } from './lesson'\r\n\r\n@Component({\r\n selector: 'lesson-search',\r\n templateUrl: '../../../views/MidrashPartialView/lesson-search.html',\r\n styleUrls: ['../../../content/lesson-search.component.scss'],\r\n providers: [LessonSearchService]\r\n}\r\n )\r\nexport class LesonSearchComponent implements OnInit{\r\n lessons: Observable;\r\n private searchTerms = new Subject();\r\n\r\n constructor(\r\n private lessonSearchService: LessonSearchService,\r\n private router: Router\r\n ) { };\r\n\r\n search(term: string): void {\r\n this.searchTerms.next(term);\r\n }\r\n\r\n ngOnInit(): void {\r\n this.lessons = this.searchTerms.pipe(\r\n debounceTime(300) // wait 300ms after each keystroke before considering the term\r\n ,distinctUntilChanged() // ignore if next search term is same as previous\r\n ,switchMap(term => term // switch to new observable each time the term changes\r\n // return the http search observable\r\n ? this.lessonSearchService.search(term)\r\n // or the observable of empty lessons if there was no search term\r\n : of([]))\r\n ,catchError(error => {\r\n // TODO: add real error handling\r\n console.error(error);\r\n return of([]);\r\n }));\r\n }\r\n\r\n gotoDetail(lesson: Lesson): void {\r\n let link = ['/detail', lesson.Id];\r\n this.router.navigate(link);\r\n }\r\n\r\n\r\n\r\n\r\n}\r\n","import { Injectable } from '@angular/core'\r\nimport { HttpClient } from '@angular/common/http'\r\nimport { Observable } from 'rxjs';\r\nimport { AppGlobalsModule } from '../app-globals.module'\r\n\r\nimport { map } from 'rxjs/operators';\r\n\r\nimport { Lesson } from './lesson'\r\n\r\n\r\n@Injectable()\r\nexport class LessonSearchService {\r\n constructor(private http: HttpClient) { }\r\n\r\n search(term: string): Observable {\r\n return this.http\r\n .get(AppGlobalsModule.apiPath(`lessons/?search=${term}`));\r\n }\r\n}","\r\nimport { Component, Input, OnInit } from \"@angular/core\"\r\nimport { ActivatedRoute, ParamMap } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { AppGlobalsModule } from '../app-globals.module'\r\n\r\n\r\n\r\nimport { Lesson } from \"./lesson\"\r\nimport { DomSanitizer, SafeResourceUrl, SafeStyle } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n selector: 'lesson-short',\r\n templateUrl: '../../../views/MidrashPartialView/lesson-short.html',\r\n styleUrls: ['../../../content/lesson-short.component.scss']\r\n})\r\nexport class LessonShortComponent {\r\n globals = AppGlobalsModule;\r\n\r\n constructor(private sanitizer: DomSanitizer) {\r\n }\r\n @Input() lesson: Lesson;\r\n\r\n public picForLesson(): SafeStyle {\r\n return this.sanitizer.bypassSecurityTrustStyle(\"url(\"+Lesson.image(this.lesson) + \")\");\r\n\r\n }\r\n\r\n public origianlRabbiImage():SafeStyle{\r\n //this regex will take /SiteProjects/YeshivaModels/Logic/Images/spriteRszRound.aspx?pic=R-emelamed.jpg&v=20181128034241 as input\r\n //and will convert to \"url(/images/rabanim/emelamed.jpg?v=20181128034241)\"\r\n let originalUrl = this.lesson.RabbiPicture;\r\n return this.sanitizer.bypassSecurityTrustStyle(\"url(\" \r\n + originalUrl.replace(\"/SiteProjects/YeshivaModels/Logic/Images/spriteRszRound.aspx?pic=R-\",\"/images/rabanim/\")\r\n .replace(\"&v=\",\"?v=\")\r\n + \")\");\r\n }\r\n\r\n\r\n\r\n\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { Lesson } from \"./lesson\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { BackenAccessService } from \"../shared/backend-access.service\";\r\nimport { AppGlobalsModule } from \"../app-globals.module\";\r\nimport { UserHistoryService } from \"../user-history/user-history.service\";\r\nimport { YeshivaModels } from \"../serverTypes/yeshivaTypes\";\r\nimport { UserService } from \"../user/user.service\";\r\nimport { ErrorsService } from \"../core/errors/errors-service/errors.service\";\r\n\r\n \r\n @Injectable()\r\n export class LessonService {\r\n public lessonUrl = AppGlobalsModule.apiPath(\"lessonDetails\");\r\n public counterUrl = \"/midrash/counterShiur.aspx\";///AppGlobalsModule.apiPath(\"lessonCounter\");\r\n\r\n constructor(private http: HttpClient,\r\n private backendAccessService: BackenAccessService,\r\n private userHistoryService: UserHistoryService,\r\n private userSevice: UserService,\r\n private errorService: ErrorsService){\r\n\r\n }\r\n\r\n getLesson(id: number): Observable {\r\n // Save user view to history\r\n if (!AppGlobalsModule.isServer) {\r\n if ((this.userSevice.userConnected())) {\r\n this.userHistoryService.SaveContentView(YeshivaModels.BE.ContentType.SHIUR, id)\r\n } else {\r\n // Watch till user connect\r\n this.userSevice.getUser().subscribe(\r\n user => this.userHistoryService.SaveContentView(YeshivaModels.BE.ContentType.SHIUR, id),\r\n error => this.errorService.log(error)\r\n );\r\n }\r\n }\r\n const url = `${this.lessonUrl}/${id}`;\r\n return this.http.get(url)\r\n //TODO: check if data is alrady exist\r\n // can take partial data from the lessons list\r\n //return this.getLessons().then(lessons => lessons.find(lesson => lesson.Id === id));\r\n }\r\n\r\n updateLessonCounter(lesson: Lesson){\r\n\r\n //tell angular not to parse post results as JSON\r\n if (!AppGlobalsModule.isServer) {\r\n this.http.post(this.counterUrl + '?id=' + lesson.Id,null, {responseType: 'text'}).subscribe();\r\n }\r\n }\r\n}\r\n","import {YeshivaModels} from '../serverTypes/yeshivaTypes';\r\n\r\nexport class Lesson extends YeshivaModels.BE.Shiur{\r\n\r\n public static image(lesson: Lesson,bigSize:Boolean = false): string {\r\n if (lesson.Video) {\r\n let link = lesson.VideoPicture;\r\n if(bigSize){\r\n link = link.replace('V1-','V3-');\r\n }\r\n return link;\r\n }\r\n else {\r\n //use direct link for rabbis images due to problems in resoluiton\r\n //this regex will take /SiteProjects/YeshivaModels/Logic/Images/spriteRszRound.aspx?pic=R-emelamed.jpg&v=20181128034241 as input\r\n //and will convert to /images/rabanim/emelamed.jpg?v=20181128034241 as output\r\n return lesson.RabbiPicture.replace('/SiteProjects/YeshivaModels/Logic/Images/spriteRszRound.aspx?pic=R-','/images/rabanim/')\r\n .replace('&v=','?v=');\r\n }\r\n }\r\n\r\n\r\n }\r\n\r\n","import { Injectable } from '@angular/core'\r\nimport { Subject , BehaviorSubject } from 'rxjs';\r\n\r\nimport { LessonsFilter } from './lessons-filter'\r\nimport { AppUtilsModule } from '../app-utils.module';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { midrashAngular } from '../serverTypes/yeshivaTypes';\r\n\r\n\r\n@Injectable()\r\nexport class LessonsFilterService {\r\n private filter: LessonsFilter;\r\n public filterApplied = false;\r\n\r\n // Filter Changes observable source\r\n private filterChangedSource = new BehaviorSubject(new LessonsFilter());\r\n // Filter Changes bservable stream\r\n filterChanges = this.filterChangedSource.asObservable();\r\n\r\n constructor (\r\n private route: ActivatedRoute){\r\n \r\n \r\n }\r\n\r\n setFilterFromQuaryParams(){ \r\n //set global filter by initial params\r\n var quaryParams = this.route.queryParamMap.subscribe(params =>{\r\n if(params.keys.length == 0){\r\n return;\r\n }\r\n var quaryFilter: LessonsFilter = this.getAppliedFilter();\r\n if(quaryFilter == null){\r\n quaryFilter = new LessonsFilter();\r\n }\r\n //cat -- need to be removed and redirect to category page\r\n if(quaryFilter.catId == null && params.has(\"cat\")){\r\n quaryFilter.catId = parseInt(params.get(\"cat\"));\r\n }\r\n \r\n //rabbi\r\n if(quaryFilter.filtRabbis.length == 0 && params.has(\"rabbi\")){\r\n quaryFilter.filtRabbis.push(parseInt(params.get(\"rabbi\")));\r\n }\r\n\r\n //filter\r\n if(params.has(\"filter\")){\r\n //abort exist format filters\r\n quaryFilter.unFiltFormat();\r\n\r\n if(params.get(\"filter\").includes(\"video\")){\r\n quaryFilter.filtVideo = true;\r\n }\r\n if(params.get(\"filter\").includes(\"audio\") || params.get(\"filter\").includes(\"mp3\") ){\r\n quaryFilter.filtAudio = true;\r\n }\r\n if(params.get(\"filter\").includes(\"pdf\")){\r\n quaryFilter.filtPDF = true;\r\n }\r\n if(params.get(\"filter\").includes(\"txt\")){\r\n //use txt to filter all read filters\r\n quaryFilter.filtRead(true);\r\n }\r\n }\r\n\r\n //orderby as order\r\n if(params.has(\"order\")){\r\n var orderCode = parseInt(params.get(\"order\"));\r\n //for old parameters\r\n if(orderCode == -1){\r\n quaryFilter.orderBy = midrashAngular.API.enums.OrderBy.dateUp;\r\n }\r\n else if(orderCode == -2){\r\n quaryFilter.orderBy = midrashAngular.API.enums.OrderBy.length;\r\n }\r\n else {\r\n quaryFilter.orderBy = orderCode as midrashAngular.API.enums.OrderBy;\r\n }\r\n }\r\n\r\n //desc\r\n if(params.has(\"desc\")){\r\n if(params.get(\"desc\") == \"true\"){\r\n quaryFilter.order = midrashAngular.API.enums.Order.desc;\r\n } \r\n else{\r\n quaryFilter.order = midrashAngular.API.enums.Order.asc;\r\n }\r\n }\r\n\r\n //search\r\n if(params.has(\"q\")){\r\n //redirect to search page\r\n window.location.replace(`/search?q=${params.get(\"q\")}`);\r\n //quaryFilter.searchTerm = params.get(\"q\"); \r\n }\r\n\r\n this.setFilter(quaryFilter);\r\n })\r\n }\r\n \r\n setFilter(newFilter: LessonsFilter) {\r\n this.filter = AppUtilsModule.deepCopyObj(newFilter);\r\n this.filterApplied = true;\r\n this.filterChangedSource.next(this.filter);\r\n }\r\n\r\n removeFilter() {\r\n this.filter = null;\r\n this.filterApplied = false;\r\n this.filterChangedSource.next(null);\r\n }\r\n\r\n getAppliedFilter():LessonsFilter{\r\n if (this.filterApplied) {\r\n var copy = AppUtilsModule.deepCopyObj(this.filter);\r\n return copy;\r\n }\r\n \r\n return null;\r\n }\r\n\r\n\r\n}","import { Lesson } from \"./lesson\";\r\nimport {midrashAngular} from '../serverTypes/yeshivaTypes'\r\n\r\n//TODO: change to enums\r\n//TODO: add orderby,category,search,order\r\nexport class LessonsFilter{ \r\n public catId: number = null;\r\n //true => include also those lessons (if false - don't use it for filter)\r\n //two values with true => OR operation\r\n public filtVideo: Boolean = false;\r\n public filtAudio: Boolean = false;\r\n public filtTxt: Boolean = false;\r\n public filtPDF: Boolean = false;\r\n public filtDoc: Boolean = false;\r\n public filtMinLength: number;\r\n public filtMaxLength: number;\r\n public filtRabbis: number[] = [];\r\n public orderBy: midrashAngular.API.enums.OrderBy = null;\r\n public order: midrashAngular.API.enums.Order = null;\r\n\r\n //public lessonsLength: midrashAngular.API.enums.LessonsLengths = null;\r\n //public lessonsDates: midrashAngular.API.enums.LessonsLDates = null;\r\n\r\n public searchTerm: string = null;\r\n homepageFirstPage: boolean = false;\r\n\r\n public validForFilter(lesson: Lesson): boolean{\r\n var valid: boolean = true;\r\n //TODO: add lessons parameters and check according to filter\r\n\r\n return valid;\r\n }\r\n\r\n public updateNedeed(otherFilter: LessonsFilter, fixedFilter: LessonsFilter = null): boolean {\r\n\r\n if (this.filtVideo != otherFilter.filtVideo &&\r\n (!fixedFilter || fixedFilter.filtVideo !== true)) {\r\n return true;\r\n }\r\n if (this.filtAudio != otherFilter.filtAudio &&\r\n (!fixedFilter || fixedFilter.filtAudio != true)) {\r\n return true;\r\n }\r\n if (this.filtTxt !== otherFilter.filtTxt &&\r\n (!fixedFilter || fixedFilter.filtTxt != true)) {\r\n return true;\r\n }\r\n if (this.filtPDF !== otherFilter.filtPDF &&\r\n (!fixedFilter || fixedFilter.filtPDF != true)) {\r\n return true;\r\n }\r\n if (this.filtDoc != otherFilter.filtDoc &&\r\n (!fixedFilter || fixedFilter.filtDoc != true)) {\r\n return true;\r\n }\r\n if (this.catId != otherFilter.catId &&\r\n (!fixedFilter || fixedFilter.catId == null)) {\r\n return true;\r\n }\r\n if (!this.isEqualArreys(this.filtRabbis,otherFilter.filtRabbis) &&\r\n (!fixedFilter || fixedFilter.filtRabbis.length === 0)) {\r\n return true;\r\n }\r\n if (this.orderBy != otherFilter.orderBy &&\r\n (!fixedFilter || fixedFilter.orderBy == null)) {\r\n return true;\r\n }\r\n if (this.order != otherFilter.order &&\r\n (!fixedFilter || fixedFilter.order == null)) {\r\n return true;\r\n }\r\n if (this.searchTerm != otherFilter.searchTerm &&\r\n (!fixedFilter || fixedFilter.searchTerm == null)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public combaineFixedFilterWithGeneralFilter(generalFilter: LessonsFilter): LessonsFilter {\r\n let combainedFilter: LessonsFilter = new LessonsFilter();\r\n combainedFilter.filtVideo = this.filtVideo || generalFilter.filtVideo;\r\n combainedFilter.filtAudio = this.filtAudio || generalFilter.filtAudio;\r\n combainedFilter.filtTxt = this.filtTxt || generalFilter.filtTxt;\r\n combainedFilter.filtPDF = this.filtPDF || generalFilter.filtPDF;\r\n combainedFilter.filtDoc = this.filtDoc || generalFilter.filtDoc;\r\n combainedFilter.catId = this.catId != null ? this.catId : generalFilter.catId;\r\n combainedFilter.homepageFirstPage = this.homepageFirstPage;\r\n combainedFilter.filtRabbis = this.filtRabbis.length > 0 ?\r\n this.filtRabbis :\r\n generalFilter.filtRabbis;\r\n combainedFilter.orderBy = this.orderBy ?\r\n this.orderBy :\r\n generalFilter.orderBy;\r\n combainedFilter.order = this.order ?\r\n this.order :\r\n generalFilter.order;\r\n combainedFilter.searchTerm = this.searchTerm ?\r\n this.searchTerm :\r\n generalFilter.searchTerm;\r\n\r\n\r\n return combainedFilter;\r\n }\r\n\r\n public unFilt(){\r\n this.unFiltFormat();\r\n this.unfiltLength();\r\n this.catId = null;\r\n this.filtRabbis = [];\r\n }\r\n\r\n public unFiltFormat(){\r\n this.filtTxt = false;\r\n this.filtPDF = false;\r\n this.filtDoc = false;\r\n this.filtVideo = false;\r\n this.filtAudio = false;\r\n }\r\n\r\n public unfiltLength(){\r\n this.filtMinLength = null;\r\n this.filtMaxLength = null;\r\n }\r\n\r\n public filtRead(inFilter: Boolean): void {\r\n this.filtTxt = inFilter;\r\n this.filtPDF = inFilter;\r\n this.filtDoc = inFilter;\r\n }\r\n\r\n public filtMedia(inFilter: Boolean) {\r\n this.filtVideo = inFilter;\r\n this.filtAudio = inFilter;\r\n }\r\n\r\n private isEqualArreys(arr1: any[], arr2: any[]):boolean{\r\n return (arr1.length == arr2.length) && arr1.every((val,index) => arr2.indexOf(val) >= 0); \r\n }\r\n\r\n public isFormatFilt():Boolean{\r\n if(this.filtVideo||this.filtAudio||this.filtPDF||this.filtTxt||this.filtDoc){\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SharedModule } from '../shared/shared.module';\r\nimport { LessonDetailComponent } from './lesson-detail.component';\r\nimport { LesonSearchComponent } from './lesson-search.component';\r\nimport { CategoryModule } from '../category/category.module';\r\nimport { FilterPageComponent } from './filter-page/filter-page.component';\r\nimport { UserHistoryService } from '../user-history/user-history.service';\r\n\r\n@NgModule({\r\n imports: [\r\n SharedModule\r\n ],\r\n declarations: [ \r\n LessonDetailComponent,\r\n LesonSearchComponent,\r\n FilterPageComponent\r\n ],\r\n providers: [UserHistoryService]\r\n})\r\nexport class LessonsModule { }\r\n","import { Component, Input, OnInit } from \"@angular/core\"\r\nimport { LessonsFilter } from \"./lessons-filter\";\r\n\r\nimport {midrashAngular} from '../serverTypes/yeshivaTypes'\r\n\r\n\r\n@Component({\r\n selector:'recomandedLessons',\r\n template:''\r\n})\r\nexport class RecomandedLessonsComponent implements OnInit{\r\n public recomandedFilter:LessonsFilter;\r\n\r\n ngOnInit(){\r\n this.recomandedFilter = new LessonsFilter();\r\n this.recomandedFilter.orderBy = midrashAngular.API.enums.OrderBy.popularity;\r\n //show lessons from all categories alwayes\r\n this.recomandedFilter.catId = 0;\r\n this.recomandedFilter.filtRabbis = [-1];\r\n this.recomandedFilter.homepageFirstPage = true;\r\n }\r\n}","import { Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { BackenAccessService } from \"../shared/backend-access.service\";\r\nimport { AppGlobalsModule } from \"../app-globals.module\";\r\n\r\nimport { YeshivaModels, midrashAngular } from '../serverTypes/yeshivaTypes';\r\n\r\n\r\n @Injectable()\r\n export class RepliesService {\r\n public reliesnUrl = AppGlobalsModule.apiPath('Reply');\r\n\r\n constructor(private http: HttpClient,\r\n private backendAccessService: BackenAccessService){\r\n\r\n }\r\n\r\n getReplies(id: number): Observable {\r\n const url = `${this.reliesnUrl}/?id=${id}&replyType=${midrashAngular.API.enums.ReplyType.SHIUR}`;\r\n return this.http.get(url);\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { AppGlobalsModule } from './app-globals.module'\r\nimport { AppStoreService } from './app-store.service';\r\n\r\n@Component({\r\n selector: 'main-nav-links',\r\n templateUrl: '../../views/MidrashPartialView/main-nav-links.html',\r\n styleUrls: ['../../content/main-nav-links.component.scss']\r\n})\r\nexport class MainNavLinks{\r\n constructor(public appStore:AppStoreService){}\r\n \r\n}\r\n\r\nexport enum MainNavs{\r\n CURRENT = 0,\r\n RECOMENDED =1,\r\n POPULAR = 2,\r\n FILTER\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { AppGlobalsModule } from './app-globals.module';\r\nimport { I18n } from \"@ngx-translate/i18n-polyfill\";\r\n\r\n@Component({\r\n selector: 'midrash-quick-menu',\r\n templateUrl: '../../views/MidrashPartialView/quick-menu.html'\r\n})\r\nexport class MidrashQuickMenu {\r\n constructor(private i18n: I18n){}\r\n\r\n tiles = [\r\n { text: this.i18n({value: 'שיעור לדרך', id:\"classForTheRoad\"}), cols: 3, rows: 1, icon: 'glyphicon-road', color: 'lightblue',isWide:true },\r\n { text: this.i18n({value: 'קובע עיתים', id:\"setStudyTimes\"}), cols: 3, rows: 1, icon: 'glyphicon-time', color: 'lightblue', isWide: true },\r\n { text: this.i18n({value: 'בחן את עצמך', id:\"testYourself\"}), cols: 3, rows: 1, icon: 'glyphicon-check', color: 'lightblue', isWide: true },\r\n { text: this.i18n({value: 'דפדף במדף', id:\"browseTheShelf\"}), cols: 1, rows: 1, icon: 'glyphicon-book', color: 'lightblue' },\r\n { text: this.i18n({value: 'פניני הלכה', id:\"penineiHalacha\"}), cols: 1, rows: 1, icon: 'glyphicon-briefcase', color: 'lightblue' },\r\n { text: this.i18n({value: 'לימוד אישי', id:\"customLearning\"}), cols: 1, rows: 1, icon: 'glyphicon-user', color: 'lightblue' },\r\n { text: this.i18n({value: 'פסקי דין רבניים', id:\"rabbinicalRulings\"}), cols: 3, rows: 1, icon: 'glyphicon-tags', color: 'lightblue', isWide: false },\r\n ];\r\n}\r\n","import { Component, Input, OnInit, ElementRef, Sanitizer, SecurityContext, SimpleChanges} from \"@angular/core\";\r\nimport { AppGlobalsModule } from './../app-globals.module';\r\nimport { ActivatedRoute, ParamMap } from '@angular/router';\r\n\r\nimport { switchMap } from 'rxjs/operators';\r\n\r\nimport {RavSummary, RavSummaryData} from './rav-summary';\r\nimport {RavService} from './rav.service';\r\nimport { AppStoreService } from '../app-store.service';\r\nimport { CategoryService } from '../category/category.service';\r\n\r\n@Component({\r\n selector:'rav-summary',\r\n templateUrl: '../../../views/MidrashPartialView/rav-summary.html',\r\n styleUrls: ['../../../content/rav-summary.scss']\r\n})\r\nexport class RavSummaryComponent{\r\n globals = AppGlobalsModule;\r\n\r\n ravSummary: RavSummary;\r\n ravData: RavSummaryData;\r\n existData: Boolean;\r\n\r\n @Input()\r\n ravId: number;\r\n @Input()\r\n allData:boolean = false;\r\n\r\n constructor(\r\n public appStore: AppStoreService,\r\n private route: ActivatedRoute,\r\n private ravService: RavService,\r\n private categoryService: CategoryService,\r\n private sanitizer: Sanitizer,\r\n private elementRef: ElementRef\r\n ) {\r\n this.existData = false;\r\n this.ravSummary = new RavSummary();\r\n let outerId = this.elementRef.nativeElement.getAttribute('ravid');\r\n if(outerId != null && outerId !== undefined){\r\n this.ravId = Number(this.sanitizer.sanitize(SecurityContext.HTML,outerId));\r\n }\r\n\r\n\r\n\r\n }\r\n\r\n //when ravId is cahnged - update the data\r\n ngOnChanges(changes: SimpleChanges){\r\n const ravId = changes.ravId;\r\n this.ravService.getRavSummary(ravId.currentValue).then(\r\n ravSummaryData => {\r\n\r\n //console.log('Rav summary promise succeeded');\r\n this.insertData(ravSummaryData)\r\n }\r\n );\r\n }\r\n\r\n insertData(data: RavSummaryData): void {\r\n this.ravData = data;\r\n this.ravSummary = new RavSummary();\r\n this.ravSummary.Data = this.ravData;\r\n this.existData = true;\r\n }\r\n\r\n}\r\n","import { YeshivaModels } from \"../serverTypes/yeshivaTypes\";\r\nimport { AppGlobalsModule } from \"../app-globals.module\";\r\n\r\nexport class RavSummary{\r\n Data: RavSummaryData; \r\n\r\n public ravPageLink(){\r\n return AppGlobalsModule.rabbiLink(this.Data.Rav.ID);\r\n }\r\n\r\n}\r\n\r\nexport class RavSummaryData{\r\n public Rav: any;\r\n public Order: number;\r\n public Lessons: YeshivaModels.BE.Shiur[];\r\n public LessonsSum: Number;\r\n public Series: YeshivaModels.BE.ShiurSeries[];\r\n public SeriesSum: Number;\r\n public Links: YeshivaModels.BE.SpecialRav.SpecialRavLink[];\r\n\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Injectable } from '@angular/core';\r\nimport { Headers } from '@angular/http';\r\nimport { AppGlobalsModule } from './../app-globals.module';\r\n\r\nimport { RavSummaryData } from './rav-summary';\r\nimport { LessonsFilter } from '../lessons/lessons-filter';\r\nimport { HttpClient, HttpParams } from '@angular/common/http';\r\nimport { BackenAccessService } from '../shared/backend-access.service';\r\nimport { of, Observable } from 'rxjs';\r\nimport { shareReplay } from 'rxjs/operators';\r\n\r\n\r\n\r\n@Injectable()\r\nexport class RavService {\r\n private ravLessonsUrl = AppGlobalsModule.apiPath('lessonsRabbis');\r\n private ravUrl = AppGlobalsModule.apiPath('rabbi');\r\n\r\n private rabbisList: any[];\r\n private allRabbies: Observable;\r\n\r\n constructor(private http: HttpClient,\r\n private backendAccessService: BackenAccessService){\r\n\r\n // Init all rabies list\r\n this.allRabbies = this.http.get(this.ravLessonsUrl).pipe(shareReplay());\r\n\r\n //initial set of rabbis\r\n this.getRavsListWithLessonsNumber().then(\r\n allRabbis => this.rabbisList = allRabbis\r\n );\r\n }\r\n\r\n\r\n getRavsListWithLessonsNumber(lessonsFilter:LessonsFilter = null):Promise{\r\n if(this.rabbisList && !lessonsFilter){\r\n return of(this.rabbisList).toPromise();\r\n }\r\n\r\n //TODO: remove order and orderby from params\r\n const options = {params: this.backendAccessService.filterToAPIParameters(lessonsFilter)};\r\n const url = `${this.ravLessonsUrl}`;\r\n\r\n // If there is no list we need to get all rabies observeble\r\n if (!this.rabbisList && !lessonsFilter) {\r\n return this.allRabbies.toPromise();\r\n }\r\n\r\n return this.http.get(url,options)\r\n .toPromise()\r\n .catch(this.handleError);\r\n }\r\n\r\n getRavSummary(id: number): Promise {\r\n const url = `${this.ravUrl}/${id}`;\r\n return this.http.get(url)\r\n .toPromise()\r\n .catch(this.handleError);\r\n }\r\n\r\n async getRavDetails(id: number){\r\n if(this.rabbisList.length === 0){\r\n await this.getRavsListWithLessonsNumber();\r\n }\r\n return this.rabbisList.find(rav => rav.Id === id);\r\n }\r\n\r\n private handleError(error: any): Promise {\r\n console.error('An error occurred in rav service' + error.message, error); // for demo purposes only\r\n return Promise.reject(error.message || error);\r\n }\r\n}\r\n","module.exports = \"\\r\\n\\r\\n\"","module.exports = \"\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3JhdnMvcmF2L3Jhdi5jb21wb25lbnQuc2NzcyJ9 */\"","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute, ParamMap } from '@angular/router';\r\n\r\nimport { switchMap } from 'rxjs/operators';\r\nimport { AppStoreService, HeaderType } from \"../../app-store.service\";\r\nimport { LessonsFilterService } from '../../lessons/lessons-filter-service';\r\nimport { LessonsFilter } from \"../../lessons/lessons-filter\";\r\nimport { RavService } from '../rav.service';\r\nimport { RavSummary } from '../rav-summary';\r\nimport { I18n } from \"@ngx-translate/i18n-polyfill\";\r\n\r\n@Component({\r\n selector: 'app-rav',\r\n templateUrl: './rav.component.html',\r\n styleUrls: ['./rav.component.scss']\r\n})\r\nexport class RavComponent implements OnInit {\r\n\r\n constructor(\r\n private route: ActivatedRoute,\r\n private appStore: AppStoreService,\r\n private lessonsFilterService: LessonsFilterService,\r\n private ravService: RavService,\r\n private i18n: I18n) { }\r\n\r\n public ravId: number;\r\n\r\n private data: any;\r\n\r\n ngOnInit(): void {\r\n this.route.paramMap.subscribe((params) => {\r\n this.ravId = parseInt(params.get('id'));\r\n\r\n let currentGlobalFilter = this.lessonsFilterService.getAppliedFilter();\r\n if (currentGlobalFilter == null) {\r\n currentGlobalFilter = new LessonsFilter();\r\n }\r\n currentGlobalFilter.filtRabbis = [this.ravId];\r\n this.lessonsFilterService.setFilter(currentGlobalFilter);\r\n\r\n this.ravService.getRavSummary(this.ravId).then(RavSummary =>{\r\n\r\n //console.log('Rav summary promise succeeded');\r\n let ravTitle = RavSummary.Rav.FullName;\r\n //update appStore info\r\n this.appStore.updateDisplayTitle(ravTitle);\r\n this.appStore.setPageTitle(ravTitle + ' | ' + this.i18n({value: 'שיעורי תורה', id: 'torahLessons'}));\r\n this.appStore.headerType = HeaderType.rabbi;\r\n this.appStore.navLinks = [ ]\r\n });//.catch( x => (console.log('Rav summary promise failed')))\r\n });\r\n\r\n}\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RavComponent } from './rav/rav.component';\r\nimport { SharedModule } from '../shared/shared.module';\r\n\r\n@NgModule({\r\n imports: [\r\n SharedModule\r\n ],\r\n declarations: [RavComponent]\r\n})\r\nexport class RavsModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject , BehaviorSubject , Observable } from \"rxjs\";\r\n\r\n@Injectable()\r\nexport class ResponsiveService {\r\n private isMobile = new BehaviorSubject(true);\r\n public screenWidth: string;\r\n\r\n constructor() {\r\n }\r\n\r\n onMobileChange(status: boolean) {\r\n this.isMobile.next(status);\r\n }\r\n\r\n getMobileStatus(): Observable {\r\n return this.isMobile.asObservable();\r\n }\r\n\r\n public checkWidth() {\r\n var width = window.innerWidth;\r\n if (width <= 768) {\r\n this.screenWidth = 'sm';\r\n this.onMobileChange(true);\r\n } else if (width > 768 && width <= 992) {\r\n this.screenWidth = 'md';\r\n this.onMobileChange(false);\r\n } else {\r\n this.screenWidth = 'lg';\r\n this.onMobileChange(false);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input, Pipe, PipeTransform, ViewChild } from \"@angular/core\";\r\nimport { YeshivaModels } from \"../serverTypes/yeshivaTypes\";\r\nimport { Lesson } from \"../lessons/lesson\";\r\nimport { AppGlobalsModule } from \"../app-globals.module\";\r\n\r\nimport {OverlayModule, Overlay, OverlayRef, OverlayConfig} from '@angular/cdk/overlay';\r\nimport { ComponentPortal, TemplatePortal, CdkPortal, PortalOutlet, CdkPortalOutlet } from \"@angular/cdk/portal\";\r\nimport { CloseScrollStrategyConfig } from \"@angular/cdk/overlay/typings/scroll/close-scroll-strategy\";\r\nimport { SeriesService } from \"./series.service\";\r\n\r\nconst SHRINK_NUMBER_OF_LESSONS = 3;\r\nconst EXPEND_NUMBER_OF_LESSONS = 6;\r\n\r\n@Component({\r\n selector:'series-preview',\r\n templateUrl: '../../../views/MidrashPartialView/series-preview.html',\r\n styleUrls: ['../../../content/series-preview.component.scss']\r\n})\r\nexport class SeriesPreviewComponent implements OnInit{\r\n globals = AppGlobalsModule;\r\n\r\n @Input() public series: YeshivaModels.BE.Series;\r\n @Input() currentId: number;\r\n\r\n @ViewChild(CdkPortal) templatePortal: TemplatePortal;\r\n @ViewChild(\"shrinkPortalHost\", {read: CdkPortalOutlet}) shrinkPortalHost: CdkPortalOutlet;\r\n\r\n private overlayRef: OverlayRef;\r\n\r\n private seriesPicture:string;\r\n private seriesRabbi: YeshivaModels.BE.Rabbi;\r\n\r\n private lessons: YeshivaModels.BE.Shiur[];\r\n private moreLessonsToLoad:Boolean = true;\r\n\r\n constructor(private seriesService: SeriesService,\r\n private overlay: Overlay){}\r\n\r\n async ngOnInit(){\r\n if(!this.series){\r\n //fetch series from service (await)\r\n\r\n }\r\n\r\n if(!this.series.Lessons){\r\n //fetch lessons from service (await)\r\n\r\n } \r\n\r\n if(this.series.Lessons.length > 0){\r\n this.lessons = this.series.Lessons;\r\n if(this.series.Lessons.length == this.series.Count){\r\n this.moreLessonsToLoad = false;\r\n }\r\n }\r\n\r\n //fetch Rabbi\r\n await this.setSeriesRabbi();\r\n\r\n //fetch image\r\n await this.setSeriesPicture();\r\n\r\n //let overlay :Overlay = Overlay.prototype;\r\n\r\n //position the expended panel 40 px from the top of the screen\r\n const positionStrategy = this.overlay.position()\r\n .global()\r\n .centerHorizontally()\r\n .top('40px')\r\n\r\n\r\n const overlayConfig = new OverlayConfig({\r\n scrollStrategy: this.overlay.scrollStrategies.close({threshold:300}),\r\n positionStrategy\r\n //hasBackdrop:false,\r\n //backdropClass: 'dark-backdrop',\r\n\r\n });\r\n\r\n this.overlayRef = this.overlay.create(overlayConfig);\r\n //this.templatePortal.setAttachedHost(this.shrinkPlaceHolder);\r\n\r\n this.overlayRef.detachments().subscribe(ev => {\r\n this.shrink();\r\n });\r\n }\r\n\r\n public loadMore(){\r\n this.seriesService.getSeries(this.series.Id, this.lessons.length).then(\r\n series => {\r\n this.lessons = this.lessons.concat(series.Lessons);\r\n \r\n if(this.lessons.length >= this.series.Count){\r\n this.moreLessonsToLoad = false;\r\n }\r\n }\r\n );\r\n\r\n }\r\n\r\n private isExpended: boolean = false;\r\n\r\n public expend():void{\r\n this.isExpended = true;\r\n //const userProfilePortal = new ComponentPortal(SeriesPreviewComponent);\r\n //overlayRef.attach(userProfilePortal);\r\n\r\n this.shrinkPortalHost.detach();\r\n this.overlayRef.attach(this.templatePortal);\r\n }\r\n\r\n public shrink():void{\r\n this.isExpended = false;\r\n\r\n if(this.overlayRef.hasAttached){\r\n this.overlayRef.detach();\r\n }\r\n\r\n this.shrinkPortalHost.attach(this.templatePortal);\r\n }\r\n\r\n //needs to move to service\r\n\r\n setSeriesPicture(): void{\r\n if(this.series.Lessons.length > 0){\r\n this.seriesPicture = Lesson.image(this.series.Lessons[0]);\r\n }\r\n }\r\n\r\n setSeriesRabbi(): void{\r\n if(this.series.Lessons.length > 0){\r\n //change to rabbi service\r\n let seriesRabbi = new YeshivaModels.BE.Rabbi();\r\n seriesRabbi.Name = this.series.Lessons[0].Author.Value;\r\n seriesRabbi.ID = this.series.Lessons[0].Author.Key;\r\n\r\n this.seriesRabbi = seriesRabbi;\r\n }\r\n }\r\n\r\n getIndex(lesson:Lesson){\r\n //TODO: add index in series for lessons for correct ordering and use the property directly\r\n return this.lessons.indexOf(lesson);\r\n }\r\n\r\n }\r\n\r\n @Pipe({\r\n name: 'seriesPreview'\r\n })\r\n export class SeriesPreviewPipe implements PipeTransform{\r\n transform(list: Lesson[],currentId: number, expended:boolean) {\r\n //no filter\r\n if(expended)\r\n return list;\r\n\r\n //find current index\r\n let currentIndex = list.findIndex(lesson => lesson.Id == currentId);\r\n\r\n let firstIndex = currentIndex > 0 ? currentIndex - 1 : 0;\r\n let endIndex = firstIndex + SHRINK_NUMBER_OF_LESSONS //currentIndex < list.length - 1 ? currentIndex + 1 : currentIndex;\r\n //let length = lastIndex - firstIndex + 1;\r\n return list.slice(firstIndex,endIndex);\r\n }\r\n }\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { AppGlobalsModule } from \"../app-globals.module\";\r\nimport { YeshivaModels } from \"../serverTypes/yeshivaTypes\";\r\n\r\n//TODO: take this from global\r\nconst SERIES_PAGE_SIZE = 20;\r\n\r\n@Injectable()\r\nexport class SeriesService{\r\n constructor(private http:HttpClient){ \r\n }\r\n\r\n private seriesUrl = AppGlobalsModule.apiPath(\"seriesDetails\");\r\n\r\n public async getSeries(id:number,skip:number = 0){\r\n let page:number = Math.floor(skip/SERIES_PAGE_SIZE) + 1;\r\n\r\n return this.http.get(this.seriesUrl+`/${id}` + (skip > 1? `?page=${page}`:''))\r\n .toPromise()\r\n }\r\n}","\r\n\r\n \r\n\r\n \r\n\r\n\r\nexport namespace midrashAngular.API {\r\n export class CurrectWrapper {\r\n Holiday: YeshivaModels.DAL.Holiday;\r\n LimudYomi: YeshivaModels.BE.LimudYomiData[];\r\n Popular: YeshivaModels.BE.Shiur[];\r\n RecentRepliesLessons: YeshivaModels.BE.Shiur[];\r\n Shabbat1: YeshivaModels.BE.Category;\r\n Shabbat2: YeshivaModels.BE.Category;\r\n TopArticles: YeshivaModels.BE.Article[];\r\n }\r\n}\r\nexport namespace midrashAngular.API.enums {\r\n export enum DedicateType {\r\n MEMORY = 1,\r\n RECOVER = 2,\r\n HONOR = 3,\r\n eMEMORY = 4,\r\n eRECOVER = 5,\r\n eHONOR = 6,\r\n OTHER = 7\r\n }\r\n export enum Limud {\r\n Non = 0,\r\n MishnaBrura = 1,\r\n TalmudBavli = 2,\r\n TalmudYerushalmi = 3,\r\n Rambam1 = 4,\r\n Rambam3 = 5,\r\n Mishna = 6,\r\n Emuna = 256\r\n }\r\n export enum MediaType {\r\n None = 0,\r\n Text = 1,\r\n Video = 2,\r\n Audio = 4,\r\n PDF = 8,\r\n Doc = 16\r\n }\r\n export enum Order {\r\n asc = 0,\r\n desc = 1\r\n }\r\n export enum OrderBy {\r\n none = 0,\r\n dateUp = 1,\r\n popularity = 2,\r\n length = 3,\r\n counter = 4\r\n }\r\n export enum ReplyType {\r\n NONE = 0,\r\n ARTICLE = 1,\r\n SHIUR = 2,\r\n QUESTION = 3\r\n }\r\n}\r\nexport namespace midrashAngular.API.LessonDetailsController {\r\n export class LessonDetailsWrapper {\r\n Category: YeshivaModels.BE.Category;\r\n Content: string;\r\n Shiur: YeshivaModels.BE.Shiur;\r\n }\r\n}\r\nexport namespace System.Collections.Generic {\r\n export class KeyValuePair {\r\n Key: TKey;\r\n Value: TValue;\r\n }\r\n}\r\nexport namespace YeshivaModels.BE {\r\n export enum ContentType {\r\n NONE = 0,\r\n ARTICLE = 1,\r\n SHIUR = 2,\r\n QUESTION = 3,\r\n FORUMTHREAD = 4,\r\n TEST = 5,\r\n BOOK = 6,\r\n ARTICLE_CATEGORY = 100,\r\n MIDRASH_CATEGORY = 101,\r\n ASK_CATEGORY = 102\r\n }\r\n export class ContentEntity {\r\n Author: System.Collections.Generic.KeyValuePair;\r\n Category: System.Collections.Generic.KeyValuePair;\r\n Content: string;\r\n Date: Date;\r\n Id: number;\r\n lang: YeshivaModels.Logic.Globalization.Lang;\r\n Synopsis: string;\r\n Title: string;\r\n Type: YeshivaModels.BE.ContentType;\r\n }\r\n export class Article extends YeshivaModels.BE.ContentEntity {\r\n ArticlePicture: number;\r\n ArticlePictureCredit: string;\r\n ArticlePictureDesc: string;\r\n email: boolean;\r\n facebook: boolean;\r\n getTags: string;\r\n getTagsJSON: string;\r\n hidden: boolean;\r\n importance: number;\r\n MainPicture: number;\r\n MainPictureCredit: string;\r\n MainPictureDesc: string;\r\n originalTime: Date;\r\n primary: boolean;\r\n publishTime: Date;\r\n SecondaryPicture: number;\r\n SecondaryPictureCredit: string;\r\n SecondaryPictureDesc: string;\r\n views: number;\r\n }\r\n export class Category {\r\n CatId: string;\r\n CatImageNormal: number;\r\n CatImageNormalCredit: string;\r\n CatImageNormalLink: string;\r\n CatImageSquare: number;\r\n CatImageSquareCredit: string;\r\n CatImageSquareLink: string;\r\n CatImageWide: number;\r\n CatImageWideCredit: string;\r\n CatImageWideLink: string;\r\n Count: number;\r\n Header: string;\r\n Id: number;\r\n Image: string;\r\n ImageCredit: string;\r\n IsSeries: boolean;\r\n Lessons: YeshivaModels.BE.Shiur[];\r\n Name: string;\r\n ParentId: number;\r\n Parents: string[];\r\n ParentsNames: string[];\r\n Priority: number;\r\n Redirect: number;\r\n Sons: string;\r\n }\r\n export class CategoryTree {\r\n children: YeshivaModels.BE.CategoryTree[];\r\n id: number;\r\n isSeries: boolean;\r\n name: string;\r\n priority: number;\r\n }\r\n export class ContentCategory {\r\n Id: number;\r\n Name: string;\r\n }\r\n export class HistogramaPoint {\r\n Count: number;\r\n Lenght: number;\r\n }\r\n export class LimudYomiData {\r\n eLimudType: number;\r\n Lessons: YeshivaModels.BE.Shiur[];\r\n Name: string;\r\n }\r\n export class Rabbi {\r\n Description: string;\r\n Footer: string;\r\n FullName: string;\r\n ID: number;\r\n Image: string;\r\n InAsk: boolean;\r\n InMidrash: boolean;\r\n Name: string;\r\n otherID: number;\r\n prefix: string;\r\n SelectedLang: YeshivaModels.BE.RabbiDetails;\r\n }\r\n export class RabbiCount {\r\n Count: number;\r\n Id: number;\r\n Name: string;\r\n RabbiPrefix: string;\r\n }\r\n export class RabbiDetails {\r\n Description: string;\r\n DetailsLang: YeshivaModels.Logic.Globalization.Lang;\r\n Footer: string;\r\n Name: string;\r\n prefix: string;\r\n }\r\n export class Reply {\r\n City: string;\r\n Content: string;\r\n Date: Date;\r\n Id: number;\r\n Indent: number;\r\n Item: number;\r\n Linear: string;\r\n Name: string;\r\n Title: string;\r\n Topic: number;\r\n Type: YeshivaModels.BE.ContentType;\r\n User: number;\r\n }\r\n\r\n /**\r\n * Series is a category with some additional info created spesifically for the API\r\n */\r\n export class Series extends YeshivaModels.BE.Category {\r\n\r\n /**\r\n * Avarage lesson time\r\n */\r\n Avarage: number;\r\n\r\n /**\r\n * The Rav who teaches the series.\r\n */\r\n RavId: number;\r\n }\r\n export class Shiur extends YeshivaModels.BE.ContentEntity {\r\n Audio: boolean;\r\n Bm: number;\r\n Category2: System.Collections.Generic.KeyValuePair;\r\n Counter: number;\r\n DateString: string;\r\n Dedication: string;\r\n DedicationType: number;\r\n Doc: boolean;\r\n Editor: string;\r\n EngHeb: boolean;\r\n Filename: string;\r\n Length: number;\r\n Parents: System.Collections.Generic.KeyValuePair[];\r\n PDF: boolean;\r\n Primality: number;\r\n RabbiId: number;\r\n RabbiPicture: string;\r\n SubTitle: string;\r\n SWF: boolean;\r\n Video: boolean;\r\n VideoPicture: string;\r\n }\r\n export class ShiurCategory extends YeshivaModels.BE.ContentCategory {\r\n Ename: string;\r\n NameByLang: string;\r\n Rabbi: string;\r\n }\r\n export class ShiurSeries {\r\n category: YeshivaModels.BE.ShiurCategory;\r\n DateUp: Date;\r\n LastHebDate: string;\r\n Length: number;\r\n }\r\n export class SpecialRav {\r\n Lessons: YeshivaModels.BE.Shiur[];\r\n LessonsSum: number;\r\n Links: YeshivaModels.BE.SpecialRav.SpecialRavLink[];\r\n Order: number;\r\n Rav: YeshivaModels.BE.Rabbi;\r\n Series: YeshivaModels.BE.ShiurSeries[];\r\n SeriesSum: number;\r\n }\r\n}\r\nexport namespace YeshivaModels.BE.SpecialRav {\r\n export class SpecialRavLink {\r\n icon: string;\r\n link: string;\r\n text: string;\r\n }\r\n}\r\nexport namespace YeshivaModels.DAL {\r\n export class Holiday {\r\n Lessons: YeshivaModels.BE.Shiur[];\r\n Name: string;\r\n }\r\n}\r\nexport namespace YeshivaModels.Logic.Globalization {\r\n export enum Lang {\r\n He = 1,\r\n En = 2\r\n }\r\n}\r\n\r\n\r\n","import { Injectable } from '@angular/core';\r\nimport { LessonsFilter } from '../lessons/lessons-filter';\r\nimport { HttpParams } from '@angular/common/http';\r\nimport { midrashAngular } from '../serverTypes/yeshivaTypes';\r\n\r\n@Injectable()\r\nexport class BackenAccessService {\r\n\r\npublic filterToAPIParameters(lessonsFilter: LessonsFilter): HttpParams\r\n {\r\n let params = new HttpParams();\r\n if (lessonsFilter) {\r\n //category ID\r\n if (lessonsFilter.catId && lessonsFilter.catId > 0) {\r\n //for catId == 0 use all categories\r\n params = params.set('catId', String(lessonsFilter.catId));\r\n }\r\n if (lessonsFilter.order) {\r\n params = params.set('order', String(lessonsFilter.order));\r\n }\r\n if (lessonsFilter.orderBy) {\r\n params = params.set('orderBy', String(lessonsFilter.orderBy));\r\n }\r\n //mediaTypes\r\n let mediaTypes: midrashAngular.API.enums.MediaType = midrashAngular.API.enums.MediaType.None;\r\n if (lessonsFilter.filtVideo) {\r\n mediaTypes = mediaTypes | midrashAngular.API.enums.MediaType.Video;\r\n }\r\n if (lessonsFilter.filtAudio) {\r\n mediaTypes = mediaTypes | midrashAngular.API.enums.MediaType.Audio;\r\n }\r\n if (lessonsFilter.filtTxt) {\r\n mediaTypes = mediaTypes | midrashAngular.API.enums.MediaType.Text;\r\n }\r\n if (lessonsFilter.filtPDF) {\r\n mediaTypes = mediaTypes | midrashAngular.API.enums.MediaType.PDF;\r\n }\r\n if (lessonsFilter.filtDoc) {\r\n mediaTypes = mediaTypes | midrashAngular.API.enums.MediaType.Doc;\r\n }\r\n params = params.set('mediaTypes', String(mediaTypes));\r\n //rabbis\r\n if (lessonsFilter.filtRabbis.length > 0 && !(lessonsFilter.filtRabbis.length == 1 && lessonsFilter.filtRabbis[0] == -1)) {\r\n //-1 in rabbis used to enforce fix filter of all rabbis\r\n params = params.set('rabbis', lessonsFilter.filtRabbis.join(','));\r\n }\r\n //search \r\n // TODO: Add safe, URL encoded search parameter if there is a search term\r\n if (lessonsFilter.searchTerm && lessonsFilter.searchTerm.length > 0) {\r\n params = params.set('search', lessonsFilter.searchTerm);\r\n }\r\n }\r\n return params;\r\n }\r\n}\r\n","module.exports = \"
\\r\\n
\\r\\n The English Beit Midrash of the Yeshiva Website is dedicated in memory of\\r\\n Ami Handler\\r\\n אמנון יוסף בן גבריאל יהודה ז\\\"ל\\r\\n ת.נ.צ.ב.ה\\r\\n נלב\\\"ע כ\\\"א אדר ב תשע\\\"ו\\r\\n
\\r\\n \\r\\n
\"","module.exports = \"#handlerDedication {\\n display: flex;\\n flex-direction: row;\\n box-shadow: 0px 0px 10px black;\\n background-color: #fdfdfd;\\n background-repeat: no-repeat;\\n background-position: left;\\n background-size: contain;\\n padding: 5px;\\n align-items: center; }\\n #handlerDedication #dedi_text {\\n display: flex;\\n flex-direction: column;\\n text-align: center;\\n color: black;\\n font-size: 1.3em; }\\n #handlerDedication #dedi_text #head_txt {\\n color: gray;\\n font-size: 0.7em; }\\n #handlerDedication img {\\n -o-object-fit: contain;\\n object-fit: contain;\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wZWF0O1xyXG4gICAgYmFja2dyb3VuZC1wb3NpdGlvbjogbGVmdDtcclxuICAgIGJhY2tncm91bmQtc2l6ZTogY29udGFpbjtcclxuICAgIHBhZGRpbmc6IDVweDtcclxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcblxyXG4gICAgI2RlZGlfdGV4dHtcclxuICAgICAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XHJcbiAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xyXG4gICAgICAgIGNvbG9yOiBibGFjaztcclxuICAgICAgICBmb250LXNpemU6IDEuM2VtO1xyXG5cclxuICAgICAgICAjaGVhZF90eHR7XHJcbiAgICAgICAgICAgIGNvbG9yOiBncmF5O1xyXG4gICAgICAgICAgICBmb250LXNpemU6IDAuN2VtO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBpbWd7XHJcbiAgICAgICAgb2JqZWN0LWZpdDogY29udGFpbjtcclxuICAgICAgICBtYXJnaW46IDEwcHg7XHJcbiAgICB9XHJcbn0iXX0= */\"","import { Component, OnInit } from '@angular/core';\r\nimport { AppGlobalsModule } from 'src/app/app-globals.module';\r\n\r\n@Component({\r\n selector: 'dedi-ami-handler',\r\n templateUrl: './dedi-ami-handler.component.html',\r\n styleUrls: ['./dedi-ami-handler.component.scss']\r\n})\r\nexport class DediAmiHandlerComponent implements OnInit {\r\n\r\n constructor() { }\r\n \r\n globals = AppGlobalsModule;\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\n\r\n//pure pipe for filtering name by the first letter\r\n//notice - angular will change the displayed list anly when tha array referance is changed,\r\n// not when the array is changed\r\n@Pipe({\r\n name: 'firstLetterPipe'\r\n})\r\nexport class FirstLetterPipe implements PipeTransform{\r\n transform(list: string[],firstLetter: string,filedName: string = '',checkAllWords = false) {\r\n //no filter\r\n if(firstLetter === ''){\r\n return list;\r\n }\r\n\r\n return list.filter(obj => {\r\n let name;\r\n if(filedName){\r\n name = obj[filedName];\r\n }\r\n else{\r\n name = obj;\r\n }\r\n let validName = (name.charAt(0).toLowerCase() === firstLetter.toLowerCase());\r\n if(checkAllWords){\r\n const validWords = name.split(' ').filter(word => word.charAt(0).toLowerCase() === firstLetter.toLowerCase());\r\n validName = (validWords.length > 0);\r\n }\r\n return validName;\r\n });\r\n }\r\n}\r\n\r\n","import { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { LatestLessonsComponent } from '../lessons/latest-lessons.component';\r\nimport { RecomandedLessonsComponent } from '../lessons/recomanded-lessons.component';\r\nimport { FilteredLessonsComponent } from '../lessons/filtered-lessons.component';\r\nimport { LessonShortComponent } from '../lessons/lesson-short.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport {\r\n MatSidenavModule,\r\n MatGridListModule,\r\n MatTabsModule,\r\n MatListModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatBadgeModule,\r\n MatMenuModule,\r\n MatProgressSpinnerModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatTreeModule,\r\n MatTooltipModule\r\n} from '@angular/material';\r\n\r\n\r\n\r\nimport { AppGlobalsModule } from '../app-globals.module';\r\n\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { FirstLetterPipe } from './first-letter.pipe';\r\nimport { StringIncludePipe } from './string-include.pipe';\r\nimport { SeriesPreviewPipe, SeriesPreviewComponent } from '../series/series-preview.component';\r\nimport { RavSummaryComponent } from '../ravs/rav-summary.component';\r\nimport { CategoryPreviewComponent } from '../category/category-preview.component';\r\nimport { CategoryPathComponent } from '../category/category-path.component';\r\nimport { FilterSummaryComponent } from '../lessons/filter-summary/filter-summary.component';\r\nimport { ErrorsModule } from 'src/app/core/errors/errors.module';\r\nimport { DediAmiHandlerComponent } from './dedi-ami-handler/dedi-ami-handler.component';\r\n\r\n/*\r\n* Use Shared Module to import (and export!) cross using of 3-d parrty component and our component\r\n* in order to be used in more then one module\r\n*/\r\n\r\n@NgModule({\r\n // Imports - for the use of the components in this model\r\n imports: [\r\n /* angular stuff */\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n\r\n /* angular cdk */\r\n PortalModule,\r\n /* angular material */\r\n MatSidenavModule,\r\n MatGridListModule,\r\n MatTabsModule,\r\n MatListModule,\r\n MatButtonModule,\r\n MatMenuModule,\r\n MatIconModule,\r\n MatBadgeModule,\r\n MatProgressSpinnerModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatTreeModule,\r\n MatTooltipModule,\r\n\r\n /* 3rd party moduls */\r\n\r\n /* our own custom components */\r\n AppGlobalsModule,\r\n ErrorsModule\r\n ],\r\n\r\n // Our decleration for the SharedModule - objects that are use in fem modules\r\n declarations: [\r\n // Components\r\n RecomandedLessonsComponent,\r\n LatestLessonsComponent,\r\n FilteredLessonsComponent,\r\n FilterSummaryComponent,\r\n LessonShortComponent,\r\n RavSummaryComponent,\r\n SeriesPreviewComponent,\r\n CategoryPreviewComponent,\r\n CategoryPathComponent, \r\n DediAmiHandlerComponent,\r\n\r\n // Pipes\r\n FirstLetterPipe,\r\n StringIncludePipe,\r\n SeriesPreviewPipe\r\n ],\r\n\r\n // Re-export moduels and components to use in others moduls thet import SharedModule\r\n exports: [\r\n /* angular stuff */\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n /* angular cdk */\r\n PortalModule,\r\n /* angular material */\r\n MatSidenavModule,\r\n MatGridListModule,\r\n MatTabsModule,\r\n MatListModule,\r\n MatButtonModule,\r\n MatMenuModule,\r\n MatIconModule,\r\n MatBadgeModule,\r\n MatProgressSpinnerModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatTreeModule,\r\n MatTooltipModule,\r\n /* 3rd party moduls */\r\n\r\n\r\n /* our own custom components */\r\n AppGlobalsModule,\r\n ErrorsModule,\r\n\r\n FilteredLessonsComponent,\r\n FilterSummaryComponent,\r\n LessonShortComponent,\r\n RecomandedLessonsComponent,\r\n LatestLessonsComponent,\r\n RavSummaryComponent,\r\n SeriesPreviewComponent,\r\n\r\n\r\n CategoryPreviewComponent,\r\n CategoryPathComponent,\r\n\r\n \r\n DediAmiHandlerComponent,\r\n\r\n FirstLetterPipe,\r\n StringIncludePipe,\r\n SeriesPreviewPipe\r\n ]\r\n})\r\nexport class SharedModule {\r\n static forRoot(): ModuleWithProviders {\r\n return { ngModule: SharedModule };\r\n }\r\n\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\n\r\n//pure pipe for filtering list of strings by search term\r\n//notice - angular will change the displayed list only when tha array referance is changed,\r\n// not when the array is changed\r\n@Pipe({\r\n name: 'stringIncludePipe'\r\n })\r\nexport class StringIncludePipe implements PipeTransform{\r\n transform(list: string[],searchString: string,filedName: string = '') {\r\n //no filter\r\n if(searchString === ''){\r\n return list;\r\n }\r\n return list.filter(obj => {\r\n let txt;\r\n if(filedName){\r\n txt = obj[filedName];\r\n }\r\n else{\r\n txt = obj;\r\n }\r\n return (txt.toLowerCase().indexOf(searchString.toLowerCase()) >= 0);\r\n });\r\n }\r\n}\r\n\r\n","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { UserHistoryService } from './user-history.service';\r\nimport { FilteredLessonsService } from '../lessons/filtered-lessons.service';\r\nimport { FilteredLessonsComponent } from '../lessons/filtered-lessons.component';\r\nimport { I18n } from '@ngx-translate/i18n-polyfill';\r\nimport { Router } from '@angular/router';\r\nimport { LoaderService } from '../core/services/loader/loader.service';\r\nimport { LessonsFilterService } from '../lessons/lessons-filter-service';\r\nimport { DownloadService } from '../download.service';\r\n\r\n@Component({ // These are copy from FilteredLessonsComponent\r\n templateUrl: '../../../views/MidrashPartialView/Lessons.html',\r\n styleUrls: ['../../../content/lessons.component.scss'],\r\n providers:[{provide: FilteredLessonsService, useClass:UserHistoryService, multi:true}]\r\n})\r\nexport class UserHistoryComponent extends FilteredLessonsComponent {\r\n\r\n constructor(\r\n downloadService: DownloadService,\r\n @Inject(FilteredLessonsService) lessonService: FilteredLessonsService,\r\n filterService: LessonsFilterService,\r\n loaderService: LoaderService,\r\n router: Router,\r\n i18n: I18n) {\r\n\r\n super(downloadService, lessonService, filterService, loaderService, router, i18n);\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FilteredLessonsService } from '../lessons/filtered-lessons.service';\r\nimport { AppGlobalsModule } from '../app-globals.module';\r\nimport { LessonsFilterService } from '../lessons/lessons-filter-service';\r\nimport { BackenAccessService } from '../shared/backend-access.service';\r\nimport { CurrentService } from '../home/current.service';\r\nimport { HttpClient, HttpParams } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { Lesson } from '../lessons/lesson';\r\nimport { LessonsFilter } from '../lessons/lessons-filter';\r\nimport { map, tap, catchError } from 'rxjs/operators';\r\nimport { ErrorsService } from '../core/errors/errors-service/errors.service';\r\nimport { YeshivaModels } from '../serverTypes/yeshivaTypes';\r\nimport { AppStoreService } from '../app-store.service';\r\n\r\n@Injectable()\r\nexport class UserHistoryService extends FilteredLessonsService {\r\n protected contentUrl = AppGlobalsModule.warehousePath('getWatchHistory');\r\n private saveContent = AppGlobalsModule.warehousePath('saveContent');\r\n\r\n constructor(protected http: HttpClient,\r\n protected lessonsFilterService: LessonsFilterService,\r\n protected backendAccessService: BackenAccessService,\r\n protected currentDataService: CurrentService,\r\n protected errorsService: ErrorsService,\r\n protected appStore: AppStoreService) {\r\n super(http, lessonsFilterService, backendAccessService, currentDataService, errorsService);\r\n }\r\n\r\n /**\r\n * Get user history list from the house\r\n * won't work if user isn't log in\r\n */\r\n protected defaultContent(size: number, options: { params: HttpParams; },\r\n lessonsFilter: LessonsFilter): Observable {\r\n let params = new HttpParams();\r\n params = params.set('size', '' + size);\r\n return this.http.get(this.contentUrl + '?', { params, withCredentials: true })\r\n .pipe(\r\n map(lessons => lessons.filter(lesson => lessonsFilter.validForFilter(lesson))),\r\n catchError(this.handleError('updateFillteredLessons', []))\r\n );\r\n }\r\n\r\n /**\r\n * Save user content view event to warehouse\r\n * @param TYPE Content's type\r\n * @param Content Content's id\r\n */\r\n SaveContentView(TYPE: YeshivaModels.BE.ContentType, Content: number) {\r\n let params = new HttpParams();\r\n params = params.set('contenttype', '' + TYPE).\r\n set('contentid', '' + Content).\r\n set('language', this.appStore.getLangDigit().toString());\r\n\r\n this.http.get(this.saveContent + '?', { params, withCredentials: true })\r\n .pipe(\r\n catchError(this.handleError('SaveContentView', []))\r\n ).subscribe();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, of, bindCallback, pipe } from 'rxjs';\r\nimport { first } from 'rxjs/operators';\r\ndeclare var user: any;\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UserService {\r\n\r\n // TODO: Currectly we don't support user logout.\r\n private _observable: Observable;\r\n\r\n constructor() {\r\n // Need to make sure we can contact he user.js\r\n let getJSONAsObservable = bindCallback(user.addCallback);\r\n this._observable = getJSONAsObservable();\r\n }\r\n\r\n getUser(): Observable {\r\n return this._observable;\r\n }\r\n\r\n userConnected() {\r\n return user.isConnected();\r\n }\r\n}\r\n","module.exports = __webpack_public_path__ + \"filt-selected.svg\";","// This file can be replaced during build by using the `fileReplacements` array.\r\n// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.\r\n// The list of file replacements can be found in `angular.json`.\r\n\r\nconst localDomain = 'localhost';\r\nconst localPort = '8042';\r\n\r\nconst local = {\r\n domain:localDomain,\r\n port:localPort,\r\n protocol:'http://'\r\n};\r\n\r\nconst template = {\r\n domain:localDomain,\r\n port:localPort,\r\n protocol:'http://'\r\n};\r\n\r\nconst datastore = {\r\n domain:'he.local',\r\n port:'3777',\r\n protocol:'http://'\r\n };\r\n\r\nexport const environment = {\r\n production: false,\r\n app:local,\r\n api:local,\r\n assets:local,\r\n template:template,\r\n warehouse:datastore\r\n};\r\n\r\n/*\r\n * In development mode, to ignore zone related error stack frames such as\r\n * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can\r\n * import the following file, but please comment it out in production mode\r\n * because it will have performance impact when throw error\r\n */\r\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\r\n","// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = \"0.0.28\";\n/* tslint:enable */\n","var map = {\n\t\"./messages.en-US.xlf\": \"./node_modules/raw-loader/index.js!./src/locale/messages.en-US.xlf\",\n\t\"./messages.he-IL.xlf\": \"./node_modules/raw-loader/index.js!./src/locale/messages.he-IL.xlf\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) { // check for number or string\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn id;\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/locale sync recursive ./node_modules/raw-loader/index.js!./ ^\\\\.\\\\/messages\\\\..*\\\\.xlf$\";","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppBrowserModule } from './app/app.browser.module';\r\nimport { environment } from './environments/environment';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\ndocument.addEventListener('DOMContentLoaded', () => {\r\n platformBrowserDynamic().bootstrapModule(AppBrowserModule)\r\n .catch(err => console.log(err));\r\n});\r\n","module.exports = \"