source: trip-planner-front/node_modules/.cache/babel-webpack/3940920af1159167851ee872a2ef7e2a.json@ b738035

Last change on this file since b738035 was fa375fe, checked in by Ema <ema_spirova@…>, 3 years ago

adding new components

  • Property mode set to 100644
File size: 14.7 KB
Line 
1{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith, switchMap } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/country.service\";\nimport * as i3 from \"../_services/companion.service\";\nimport * as i4 from \"../_services/cateogry.service\";\nimport * as i5 from \"@angular/forms\";\nimport * as i6 from \"@angular/material/form-field\";\nimport * as i7 from \"@angular/material/input\";\nimport * as i8 from \"@angular/material/autocomplete\";\nimport * as i9 from \"@angular/common\";\nimport * as i10 from \"@angular/material/select\";\nimport * as i11 from \"@angular/material/chips\";\nimport * as i12 from \"@angular/material/core\";\n\nfunction LocationsFormComponent_mat_option_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 9);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const option_r4 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", option_r4.name);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", option_r4.name, \" \");\n }\n}\n\nfunction LocationsFormComponent_mat_option_13_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 10);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const companion_r5 = ctx.$implicit;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(companion_r5.type);\n }\n}\n\nfunction LocationsFormComponent_mat_chip_15_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-chip\", 11);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const category_r6 = ctx.$implicit;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(category_r6.name);\n }\n}\n\nexport class LocationsFormComponent {\n constructor(cityService, countryService, companionService, categoryService) {\n this.cityService = cityService;\n this.countryService = countryService;\n this.companionService = companionService;\n this.categoryService = categoryService;\n this.myControl = new FormControl();\n this.disableSelect = new FormControl(false);\n this.filteredOptions = new Observable();\n this.cities = [];\n this.countries = [];\n this.companions = [];\n this.categories = [];\n }\n\n ngOnInit() {\n this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), switchMap(val => {\n return this.filter(val || '');\n }));\n this.categoryService.getAllCategories().subscribe(data => {\n this.categories = data;\n });\n this.companionService.getAllCompanions().subscribe(data => {\n this.companions = data;\n });\n }\n\n filter(val) {\n // call the service which makes the http-request\n return this.cityService.getAllCities().pipe(map(response => response.filter(option => {\n return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0;\n })));\n }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.CountryService), i0.ɵɵdirectiveInject(i3.CompanionService), i0.ɵɵdirectiveInject(i4.CategoryService));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: LocationsFormComponent,\n selectors: [[\"app-locations-form\"]],\n decls: 16,\n vars: 8,\n consts: [[1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Place\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [\"autoActiveFirstOption\", \"\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"disabled\"], [\"value\", \"option1\", 4, \"ngFor\", \"ngForOf\"], [\"color\", \"accent\", \"selected\", \"\", 4, \"ngFor\", \"ngForOf\"], [3, \"value\"], [\"value\", \"option1\"], [\"color\", \"accent\", \"selected\", \"\"]],\n template: function LocationsFormComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"form\", 0);\n i0.ɵɵelementStart(1, \"mat-form-field\", 1);\n i0.ɵɵelementStart(2, \"mat-label\");\n i0.ɵɵtext(3, \"Please select a place\");\n i0.ɵɵelementEnd();\n i0.ɵɵelement(4, \"input\", 2);\n i0.ɵɵelementStart(5, \"mat-autocomplete\", 3, 4);\n i0.ɵɵtemplate(7, LocationsFormComponent_mat_option_7_Template, 2, 2, \"mat-option\", 5);\n i0.ɵɵpipe(8, \"async\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(9, \"mat-form-field\", 1);\n i0.ɵɵelementStart(10, \"mat-label\");\n i0.ɵɵtext(11, \"Choose an option\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(12, \"mat-select\", 6);\n i0.ɵɵtemplate(13, LocationsFormComponent_mat_option_13_Template, 2, 1, \"mat-option\", 7);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(14, \"mat-chip-list\");\n i0.ɵɵtemplate(15, LocationsFormComponent_mat_chip_15_Template, 2, 1, \"mat-chip\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const _r0 = i0.ɵɵreference(6);\n\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(8, 6, ctx.filteredOptions));\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"disabled\", ctx.disableSelect.value);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", ctx.companions);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx.categories);\n }\n },\n directives: [i5.ɵNgNoValidate, i5.NgControlStatusGroup, i5.NgForm, i6.MatFormField, i6.MatLabel, i7.MatInput, i5.DefaultValueAccessor, i8.MatAutocompleteTrigger, i5.NgControlStatus, i5.FormControlDirective, i8.MatAutocomplete, i9.NgForOf, i10.MatSelect, i11.MatChipList, i12.MatOption, i11.MatChip],\n pipes: [i9.AsyncPipe],\n styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n min-width: 150px;\\r\\n max-width: 350px;\\r\\n width: 100%;\\r\\n}\\r\\n\\r\\n.example-full-width[_ngcontent-%COMP%] {\\r\\n width: 100%;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxnQkFBZ0I7RUFDaEIsZ0JBQWdCO0VBQ2hCLFdBQVc7QUFDYjs7QUFFQTtFQUNFLFdBQVc7QUFDYiIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgbWluLXdpZHRoOiAxNTBweDtcclxuICBtYXgtd2lkdGg6IDM1MHB4O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICB3aWR0aDogMTAwJTtcclxufSJdfQ== */\"]\n});","map":{"version":3,"sources":["C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.ts","C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\src\\app\\locations-form\\locations-form.component.html"],"names":[],"mappings":"AACA,SAAS,WAAT,QAA4B,gBAA5B;AACA,SAAQ,GAAR,EAAa,SAAb,EAAwB,SAAxB,QAAwC,gBAAxC;AACA,SAAkB,UAAlB,QAAmC,MAAnC;;;;;;;;;;;;;;;;;ACOM,I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,UAAA,EAAA,GAAA,CAAA,aAAA,CAAA,KAAA;AACwC,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA;AAMK,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,GAAA,CAAA,UAAA","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport {map, startWith, switchMap} from 'rxjs/operators';\nimport {forkJoin, Observable} from 'rxjs';\nimport { CityService } from '../_services/city.service';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CountryService } from '../_services/country.service';\nimport { Companion } from '../_models/companion';\nimport { CompanionService } from '../_services/companion.service';\nimport { Category } from '../_models/category';\nimport { CategoryService } from '../_services/cateogry.service';\nimport {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';\n\n@Component({\n selector: 'app-locations-form',\n templateUrl: './locations-form.component.html',\n styleUrls: ['./locations-form.component.css']\n})\nexport class LocationsFormComponent implements OnInit {\n\n myControl = new FormControl();\n cities: City[];\n countries: Country[];\n companions: Companion[];\n categories: Category[];\n filteredOptions: Observable<City[]>;\n disableSelect = new FormControl(false);\n\n constructor(private cityService : CityService, private countryService : CountryService,\n private companionService : CompanionService, private categoryService : CategoryService){\n this.filteredOptions = new Observable<City[]>();\n this.cities = [];\n this.countries = [];\n this.companions = [];\n this.categories = [];\n }\n \n ngOnInit() :void {\n this.filteredOptions = this.myControl.valueChanges\n .pipe(\n startWith(''),\n switchMap(val => {\n return this.filter(val || '')\n }) \n );\n\n this.categoryService.getAllCategories().subscribe(\n data => {\n this.categories = data;\n }\n );\n\n this.companionService.getAllCompanions().subscribe(\n data => {\n this.companions = data;\n }\n )\n }\n \n filter(val: string): Observable<City[]> {\n // call the service which makes the http-request\n return this.cityService.getAllCities()\n .pipe(\n map(response => response.filter(option => { \n return option.name.toLowerCase().indexOf(val.toLowerCase()) === 0\n }))\n )\n \n } \n\n \n\n}\n","<form class=\"example-form\">\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Please select a place</mat-label>\n <input type=\"text\"\n placeholder=\"Pick one\"\n aria-label=\"Place\"\n matInput\n [formControl]=\"myControl\"\n [matAutocomplete]=\"auto\">\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.name\">\n {{option.name}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n\n<mat-form-field appearance=\"fill\" class=\"example-full-width\">\n <mat-label>Choose an option</mat-label>\n <mat-select [disabled]=\"disableSelect.value\">\n <mat-option value=\"option1\" *ngFor=\"let companion of companions\">{{companion.type}}</mat-option>\n </mat-select>\n</mat-form-field>\n\n\n <mat-chip-list >\n <mat-chip color=\"accent\" selected *ngFor=\"let category of categories\">{{category.name}}</mat-chip>\n </mat-chip-list>\n \n\n</form>\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.