source: trip-planner-front/node_modules/.cache/babel-webpack/148ca6f8998e22b34cfc5a8e47c1185e.json@ 6fe77af

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

adding new components

  • Property mode set to 100644
File size: 9.3 KB
RevLine 
[fa375fe]1{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_models/city\";\nimport * as i3 from \"@angular/forms\";\nimport * as i4 from \"@angular/material/form-field\";\nimport * as i5 from \"@angular/material/input\";\nimport * as i6 from \"@angular/material/autocomplete\";\nimport * as i7 from \"@angular/common\";\nimport * as i8 from \"@angular/material/core\";\n\nfunction LocationsFormComponent_mat_option_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 5);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const city_r2 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", city_r2);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", city_r2.name, \" \");\n }\n}\n\nexport class LocationsFormComponent {\n constructor(cityService, fo) {\n this.cityService = cityService;\n this.fo = fo;\n this.myControl = new FormControl();\n this.cities = [];\n this.filteredOptions = new Observable();\n }\n\n ngOnInit() {\n this.cityService.getAllCities().subscribe(data => {\n this.cities = data;\n });\n this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), map(value => this._filter(value)));\n }\n\n _filter(value) {\n const filterValue = value.toLowerCase();\n return this.cities.filter(option => option.name.toLowerCase().includes(filterValue));\n }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n return new (t || LocationsFormComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.City));\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: LocationsFormComponent,\n selectors: [[\"app-locations-form\"]],\n decls: 11,\n vars: 4,\n consts: [[1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"placeholder\", \"Pick one\", \"aria-label\", \"Please select a place\", \"matInput\", \"\", 3, \"matAutocomplete\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"value\"]],\n template: function LocationsFormComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"h4\");\n i0.ɵɵtext(1, \"This form will help you to schedule your planner\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"form\", 0);\n i0.ɵɵelementStart(3, \"mat-form-field\", 1);\n i0.ɵɵelementStart(4, \"mat-label\");\n i0.ɵɵtext(5, \"Place\");\n i0.ɵɵelementEnd();\n i0.ɵɵelement(6, \"input\", 2);\n i0.ɵɵelementStart(7, \"mat-autocomplete\", null, 3);\n i0.ɵɵtemplate(9, LocationsFormComponent_mat_option_9_Template, 2, 2, \"mat-option\", 4);\n i0.ɵɵpipe(10, \"async\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const _r0 = i0.ɵɵreference(8);\n\n i0.ɵɵadvance(6);\n i0.ɵɵproperty(\"matAutocomplete\", _r0);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(10, 2, ctx.cities));\n }\n },\n directives: [i3.ɵNgNoValidate, i3.NgControlStatusGroup, i3.NgForm, i4.MatFormField, i4.MatLabel, i5.MatInput, i6.MatAutocompleteTrigger, i6.MatAutocomplete, i7.NgForOf, i8.MatOption],\n pipes: [i7.AsyncPipe],\n styles: [\".example-form[_ngcontent-%COMP%] {\\r\\n min-width: 150px;\\r\\n max-width: 500px;\\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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2F0aW9ucy1mb3JtLmNvbXBvbmVudC5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFDSSxnQkFBZ0I7SUFDaEIsZ0JBQWdCO0lBQ2hCLFdBQVc7RUFDYjs7RUFFQTtJQUNFLFdBQVc7RUFDYiIsImZpbGUiOiJsb2NhdGlvbnMtZm9ybS5jb21wb25lbnQuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmV4YW1wbGUtZm9ybSB7XHJcbiAgICBtaW4td2lkdGg6IDE1MHB4O1xyXG4gICAgbWF4LXdpZHRoOiA1MDBweDtcclxuICAgIHdpZHRoOiAxMDAlO1xyXG4gIH1cclxuICBcclxuICAuZXhhbXBsZS1mdWxsLXdpZHRoIHtcclxuICAgIHdpZHRoOiAxMDAlO1xyXG4gIH0iXX0= */\"]\n});\nLocationsFormComponent.ɵprov = /*@__PURE__*/i0.ɵɵdefineInjectable({\n token: LocationsFormComponent,\n factory: LocationsFormComponent.ɵfac,\n providedIn: 'root'\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;AAKA,SAAQ,GAAR,EAAa,SAAb,QAA6B,gBAA7B;AACA,SAAQ,UAAR,QAAyB,MAAzB;;;;;;;;;;;;;ACIM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,CAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAFgD,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,OAAA;AAC9C,IAA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AAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,iBAAA,EAAA,GAAA;AAEwB,MAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,MAAA,EAAA,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,CAAA,EAAA,GAAA,CAAA,MAAA,CAAA;;;;;;;;SDUtB,sB;AAAsB,EAAA,OAAA,EAAtB,sBAAsB,CAAA,I;AAAA,EAAA,UAAA,EARrB","sourcesContent":["import { Component, Injectable, OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { City } from '../_models/city';\nimport { Country } from '../_models/country';\nimport { CityService } from '../_services/city.service';\nimport { CountryService } from '../_services/country.service';\nimport {map, startWith} from 'rxjs/operators';\nimport {Observable} from 'rxjs';\n\nexport interface User {\n name: string;\n}\n@Injectable({\n providedIn: 'root'\n})\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 myControl = new FormControl();\n cities: City[];\n filteredOptions: Observable<string[]>;\n constructor(private cityService : CityService,\n private fo : City){\n this.cities = [];\n this.filteredOptions = new Observable<string[]>();\n }\n\n ngOnInit(): void {\n this.cityService.getAllCities().subscribe(\n data=>{\n this.cities = data;\n }\n );\n\n this.filteredOptions = this.myControl.valueChanges\n .pipe(\n startWith(''),\n map(value => this._filter(value))\n );\n }\n\n private _filter(value: string): string[] {\n const filterValue = value.toLowerCase();\n\n return this.cities.filter(option => option.name.toLowerCase().includes(filterValue));\n }\n\n}\n","<h4>This form will help you to schedule your planner</h4>\n<form class=\"example-form\">\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Place</mat-label>\n <input type=\"text\"\n placeholder=\"Pick one\"\n aria-label=\"Please select a place\"\n matInput\n \n [matAutocomplete]=\"auto\">\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let city of cities | async\" [value]=\"city\">\n {{city.name}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n</form>"],"sourceRoot":""},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.