Files
flights_web_raw/apps/angular/node_modules/.cache/babel-webpack/2a2518fca1bb5d6819ec5ff5dfd22e50.json
T

1 line
20 KiB
JSON

{"ast":null,"code":"import _asyncToGenerator from \"/Users/gnezim/_projects/tims/flights_web_raw/Aeroflot.Flights.Web/apps/angular/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport { FlightRequestType } from '@app/shared/enumerators/flight-request-type.enum';\nimport FlightDateUtils from '@utils/flight/date';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@online-board/services/data-source.service\";\nimport * as i2 from \"@online-board/services/api.service\";\nimport * as i3 from \"@angular/router\";\nimport * as i4 from \"@online-board/services/navigation.service\";\nimport * as i5 from \"@online-board/services/request/request-builder.service\";\nimport * as i6 from \"@online-board/services/filter/filter.service\";\nimport * as i7 from \"@shared/services/filters/online-board-filters-state.service\";\nimport * as i8 from \"./components/meta-tags/online-board-flight-number-meta-tags.component\";\nimport * as i9 from \"../../../../../components/same-url-navigation-detector/same-url-navigation-detector.component\";\nimport * as i10 from \"../components/view/online-board-search.component\";\nimport * as i11 from \"./components/title/online-board-flight-number-title.component\";\nexport class FlightNumberSearchPageComponent {\n constructor(dataSource, apiService, route, navigationService, requestBuilder, filtersService, filtersStateService) {\n this.dataSource = dataSource;\n this.apiService = apiService;\n this.route = route;\n this.navigationService = navigationService;\n this.requestBuilder = requestBuilder;\n this.filtersService = filtersService;\n this.filtersStateService = filtersStateService;\n this.FlightRequestType = FlightRequestType;\n }\n\n ngOnInit() {\n this.filtersStateService.selectedTab = 'flight';\n this.route.data.subscribe({\n next: data => {\n var _a;\n\n if ((_a = data.urlParams) === null || _a === void 0 ? void 0 : _a.flightNumber) {\n this.params = data.urlParams.flightNumber;\n this.dataSource.loadFlightsByFlightNumber(this.params);\n }\n\n this.updateCalendar();\n }\n });\n }\n\n updateCalendar() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n if (_this.params.flightNumber.length == 4) {\n var date = new Date();\n date.setUTCHours(0, 0, 0, 0);\n date.setDate(date.getDate() - 1);\n\n _this.apiService.getFlightDaysByNumber(date, _this.params.flightNumber).then(res => {\n _this.disabledDates = new Array();\n\n for (var i = 0; i < res.days.length; i++) {\n if (res.days[i] == '0') {\n _this.disabledDates.push(new Date(date));\n }\n\n date.setDate(date.getDate() + 1);\n }\n }).finally(() => {});\n } else {\n _this.disabledDates = new Array();\n }\n })();\n }\n\n get searchDate() {\n var _a;\n\n return (_a = this.params) === null || _a === void 0 ? void 0 : _a.date;\n }\n\n handleRequestCancellation() {\n this.dataSource.stopLoading();\n }\n\n handleSameUrlNavigation() {\n this.dataSource.loadFlightsByFlightNumber(this.params);\n }\n\n handleDateChange(date) {\n this.navigationService.toFlightNumberPage(Object.assign(Object.assign({}, this.params), {\n date\n }));\n }\n\n navigateToDetails(flight) {\n const request = this.requestBuilder.buildFlightNumberRequest(this.flightId, FlightDateUtils.getFlightDate(flight));\n this.navigationService.toDetailsPage({\n flightId: flight.flightId,\n date: FlightDateUtils.getFlightDate(flight),\n request\n });\n }\n\n get flightId() {\n return Object.assign(Object.assign({}, this.params), {\n date: ''\n });\n }\n\n}\n\nFlightNumberSearchPageComponent.ɵfac = function FlightNumberSearchPageComponent_Factory(t) {\n return new (t || FlightNumberSearchPageComponent)(i0.ɵɵdirectiveInject(i1.OnlineBoardDataSourceService), i0.ɵɵdirectiveInject(i2.OnlineBoardApiService), i0.ɵɵdirectiveInject(i3.ActivatedRoute), i0.ɵɵdirectiveInject(i4.OnlineBoardNavigationService), i0.ɵɵdirectiveInject(i5.OnlineBoardRequestBuilderService), i0.ɵɵdirectiveInject(i6.OnlineBoardFilterService), i0.ɵɵdirectiveInject(i7.OnlineBoardFiltersStateService));\n};\n\nFlightNumberSearchPageComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: FlightNumberSearchPageComponent,\n selectors: [[\"flight-number-search-page\"]],\n decls: 4,\n vars: 7,\n consts: [[3, \"sameUrlNavigation\"], [3, \"flights\", \"loading\", \"partners\", \"searchDate\", \"requestType\", \"withScrollUp\", \"disabledDates\", \"requestCancel\", \"searchDateChange\", \"toDetails\"], [\"title\", \"\"]],\n template: function FlightNumberSearchPageComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"online-board-flight-number-meta-tags\");\n i0.ɵɵelementStart(1, \"same-url-navigation-detector\", 0);\n i0.ɵɵlistener(\"sameUrlNavigation\", function FlightNumberSearchPageComponent_Template_same_url_navigation_detector_sameUrlNavigation_1_listener() {\n return ctx.handleSameUrlNavigation();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"online-board-search\", 1);\n i0.ɵɵlistener(\"requestCancel\", function FlightNumberSearchPageComponent_Template_online_board_search_requestCancel_2_listener() {\n return ctx.handleRequestCancellation();\n })(\"searchDateChange\", function FlightNumberSearchPageComponent_Template_online_board_search_searchDateChange_2_listener($event) {\n return ctx.handleDateChange($event);\n })(\"toDetails\", function FlightNumberSearchPageComponent_Template_online_board_search_toDetails_2_listener($event) {\n return ctx.navigateToDetails($event);\n });\n i0.ɵɵelement(3, \"online-board-flight-number-title\", 2);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"flights\", ctx.dataSource.flightsLegacy)(\"loading\", ctx.dataSource.loading)(\"partners\", ctx.dataSource.partners)(\"searchDate\", ctx.searchDate)(\"requestType\", ctx.FlightRequestType.Flight)(\"withScrollUp\", false)(\"disabledDates\", ctx.disabledDates);\n }\n },\n directives: [i8.OnlineBoardFlightNumberMetaTagsComponent, i9.SameUrlNavigationDetectorComponent, i10.OnlineBoardSearchComponent, i11.OnlineBoardFlightNumberTitleComponent],\n encapsulation: 2\n});","map":{"version":3,"sources":["/Users/gnezim/_projects/tims/flights_web_raw/Aeroflot.Flights.Web/apps/angular/src/app/features/online-board/pages/search/flight-number-search/flight-number-search-page.component.ts"],"names":["FlightRequestType","FlightDateUtils","i0","i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","FlightNumberSearchPageComponent","constructor","dataSource","apiService","route","navigationService","requestBuilder","filtersService","filtersStateService","ngOnInit","selectedTab","data","subscribe","next","_a","urlParams","flightNumber","params","loadFlightsByFlightNumber","updateCalendar","length","date","Date","setUTCHours","setDate","getDate","getFlightDaysByNumber","then","res","disabledDates","Array","i","days","push","finally","searchDate","handleRequestCancellation","stopLoading","handleSameUrlNavigation","handleDateChange","toFlightNumberPage","Object","assign","navigateToDetails","flight","request","buildFlightNumberRequest","flightId","getFlightDate","toDetailsPage","ɵfac","FlightNumberSearchPageComponent_Factory","t","ɵɵdirectiveInject","OnlineBoardDataSourceService","OnlineBoardApiService","ActivatedRoute","OnlineBoardNavigationService","OnlineBoardRequestBuilderService","OnlineBoardFilterService","OnlineBoardFiltersStateService","ɵcmp","ɵɵdefineComponent","type","selectors","decls","vars","consts","template","FlightNumberSearchPageComponent_Template","rf","ctx","ɵɵelement","ɵɵelementStart","ɵɵlistener","FlightNumberSearchPageComponent_Template_same_url_navigation_detector_sameUrlNavigation_1_listener","ɵɵelementEnd","FlightNumberSearchPageComponent_Template_online_board_search_requestCancel_2_listener","FlightNumberSearchPageComponent_Template_online_board_search_searchDateChange_2_listener","$event","FlightNumberSearchPageComponent_Template_online_board_search_toDetails_2_listener","ɵɵadvance","ɵɵproperty","flightsLegacy","loading","partners","Flight","directives","OnlineBoardFlightNumberMetaTagsComponent","SameUrlNavigationDetectorComponent","OnlineBoardSearchComponent","OnlineBoardFlightNumberTitleComponent","encapsulation"],"mappings":";AAAA,SAASA,iBAAT,QAAkC,kDAAlC;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAO,KAAKC,EAAZ,MAAoB,eAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,4CAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,oCAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,iBAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,2CAApB;AACA,OAAO,KAAKC,E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H,CAZqD;AAY4GC,EAAAA,aAAa,EAAE;AAZ3H,CAArB,CAArD","sourcesContent":["import { FlightRequestType } from '@app/shared/enumerators/flight-request-type.enum';\nimport FlightDateUtils from '@utils/flight/date';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@online-board/services/data-source.service\";\nimport * as i2 from \"@online-board/services/api.service\";\nimport * as i3 from \"@angular/router\";\nimport * as i4 from \"@online-board/services/navigation.service\";\nimport * as i5 from \"@online-board/services/request/request-builder.service\";\nimport * as i6 from \"@online-board/services/filter/filter.service\";\nimport * as i7 from \"@shared/services/filters/online-board-filters-state.service\";\nimport * as i8 from \"./components/meta-tags/online-board-flight-number-meta-tags.component\";\nimport * as i9 from \"../../../../../components/same-url-navigation-detector/same-url-navigation-detector.component\";\nimport * as i10 from \"../components/view/online-board-search.component\";\nimport * as i11 from \"./components/title/online-board-flight-number-title.component\";\nexport class FlightNumberSearchPageComponent {\n constructor(dataSource, apiService, route, navigationService, requestBuilder, filtersService, filtersStateService) {\n this.dataSource = dataSource;\n this.apiService = apiService;\n this.route = route;\n this.navigationService = navigationService;\n this.requestBuilder = requestBuilder;\n this.filtersService = filtersService;\n this.filtersStateService = filtersStateService;\n this.FlightRequestType = FlightRequestType;\n }\n ngOnInit() {\n this.filtersStateService.selectedTab = 'flight';\n this.route.data.subscribe({\n next: (data) => {\n var _a;\n if ((_a = data.urlParams) === null || _a === void 0 ? void 0 : _a.flightNumber) {\n this.params = data.urlParams.flightNumber;\n this.dataSource.loadFlightsByFlightNumber(this.params);\n }\n this.updateCalendar();\n },\n });\n }\n async updateCalendar() {\n if (this.params.flightNumber.length == 4) {\n var date = new Date();\n date.setUTCHours(0, 0, 0, 0);\n date.setDate(date.getDate() - 1);\n this.apiService\n .getFlightDaysByNumber(date, this.params.flightNumber)\n .then((res) => {\n this.disabledDates = new Array();\n for (var i = 0; i < res.days.length; i++) {\n if (res.days[i] == '0') {\n this.disabledDates.push(new Date(date));\n }\n date.setDate(date.getDate() + 1);\n }\n })\n .finally(() => {\n });\n }\n else {\n this.disabledDates = new Array();\n }\n }\n get searchDate() {\n var _a;\n return (_a = this.params) === null || _a === void 0 ? void 0 : _a.date;\n }\n handleRequestCancellation() {\n this.dataSource.stopLoading();\n }\n handleSameUrlNavigation() {\n this.dataSource.loadFlightsByFlightNumber(this.params);\n }\n handleDateChange(date) {\n this.navigationService.toFlightNumberPage(Object.assign(Object.assign({}, this.params), { date }));\n }\n navigateToDetails(flight) {\n const request = this.requestBuilder.buildFlightNumberRequest(this.flightId, FlightDateUtils.getFlightDate(flight));\n this.navigationService.toDetailsPage({\n flightId: flight.flightId,\n date: FlightDateUtils.getFlightDate(flight),\n request,\n });\n }\n get flightId() {\n return Object.assign(Object.assign({}, this.params), { date: '' });\n }\n}\nFlightNumberSearchPageComponent.ɵfac = function FlightNumberSearchPageComponent_Factory(t) { return new (t || FlightNumberSearchPageComponent)(i0.ɵɵdirectiveInject(i1.OnlineBoardDataSourceService), i0.ɵɵdirectiveInject(i2.OnlineBoardApiService), i0.ɵɵdirectiveInject(i3.ActivatedRoute), i0.ɵɵdirectiveInject(i4.OnlineBoardNavigationService), i0.ɵɵdirectiveInject(i5.OnlineBoardRequestBuilderService), i0.ɵɵdirectiveInject(i6.OnlineBoardFilterService), i0.ɵɵdirectiveInject(i7.OnlineBoardFiltersStateService)); };\nFlightNumberSearchPageComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FlightNumberSearchPageComponent, selectors: [[\"flight-number-search-page\"]], decls: 4, vars: 7, consts: [[3, \"sameUrlNavigation\"], [3, \"flights\", \"loading\", \"partners\", \"searchDate\", \"requestType\", \"withScrollUp\", \"disabledDates\", \"requestCancel\", \"searchDateChange\", \"toDetails\"], [\"title\", \"\"]], template: function FlightNumberSearchPageComponent_Template(rf, ctx) { if (rf & 1) {\n i0.ɵɵelement(0, \"online-board-flight-number-meta-tags\");\n i0.ɵɵelementStart(1, \"same-url-navigation-detector\", 0);\n i0.ɵɵlistener(\"sameUrlNavigation\", function FlightNumberSearchPageComponent_Template_same_url_navigation_detector_sameUrlNavigation_1_listener() { return ctx.handleSameUrlNavigation(); });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"online-board-search\", 1);\n i0.ɵɵlistener(\"requestCancel\", function FlightNumberSearchPageComponent_Template_online_board_search_requestCancel_2_listener() { return ctx.handleRequestCancellation(); })(\"searchDateChange\", function FlightNumberSearchPageComponent_Template_online_board_search_searchDateChange_2_listener($event) { return ctx.handleDateChange($event); })(\"toDetails\", function FlightNumberSearchPageComponent_Template_online_board_search_toDetails_2_listener($event) { return ctx.navigateToDetails($event); });\n i0.ɵɵelement(3, \"online-board-flight-number-title\", 2);\n i0.ɵɵelementEnd();\n } if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"flights\", ctx.dataSource.flightsLegacy)(\"loading\", ctx.dataSource.loading)(\"partners\", ctx.dataSource.partners)(\"searchDate\", ctx.searchDate)(\"requestType\", ctx.FlightRequestType.Flight)(\"withScrollUp\", false)(\"disabledDates\", ctx.disabledDates);\n } }, directives: [i8.OnlineBoardFlightNumberMetaTagsComponent, i9.SameUrlNavigationDetectorComponent, i10.OnlineBoardSearchComponent, i11.OnlineBoardFlightNumberTitleComponent], encapsulation: 2 });\n"]},"metadata":{},"sourceType":"module"}