source: trip-planner-front/node_modules/.cache/babel-webpack/78353b9634a7f90d64b5d52e74d3bd18.json@ 84d0fbb

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

adding new components

  • Property mode set to 100644
File size: 8.7 KB
RevLine 
[fa375fe]1{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { map, startWith } from 'rxjs/operators';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/forms\";\nimport * as i2 from \"@angular/material/form-field\";\nimport * as i3 from \"@angular/material/input\";\nimport * as i4 from \"@angular/material/autocomplete\";\nimport * as i5 from \"@angular/common\";\nimport * as i6 from \"@angular/material/core\";\n\nfunction LocationsFormComponent_mat_option_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-option\", 6);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const option_r2 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", option_r2);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", option_r2.name, \" \");\n }\n}\n\nexport class LocationsFormComponent {\n constructor() {\n this.myControl = new FormControl();\n this.options = [{\n name: 'Mary'\n }, {\n name: 'Shelley'\n }, {\n name: 'Igor'\n }];\n }\n\n ngOnInit() {\n this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), map(value => typeof value === 'string' ? value : value.name), map(name => name ? this._filter(name) : this.options.slice()));\n }\n\n displayFn(user) {\n return user && user.name ? user.name : '';\n }\n\n _filter(name) {\n const filterValue = name.toLowerCase();\n return this.options.filter(option => option.name.toLowerCase().includes(filterValue));\n }\n\n}\n\nLocationsFormComponent.ɵfac = function LocationsFormComponent_Factory(t) {\n return new (t || LocationsFormComponent)();\n};\n\nLocationsFormComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: LocationsFormComponent,\n selectors: [[\"app-locations-form\"]],\n decls: 9,\n vars: 6,\n consts: [[1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\"], [3, \"displayWith\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [3, \"value\"]],\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, \"Assignee\");\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.ɵɵ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(1);\n i0.ɵɵproperty(\"displayWith\", ctx.displayFn);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(8, 4, ctx.filteredOptions));\n }\n },\n directives: [i1.ɵNgNoValidate, i1.NgControlStatusGroup, i1.NgForm, i2.MatFormField, i2.MatLabel, i3.MatInput, i1.DefaultValueAccessor, i4.MatAutocompleteTrigger, i1.NgControlStatus, i4.MatAutocomplete, i5.NgForOf, i6.MatOption],\n pipes: [i5.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});","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;;;;;;;;;;;ACDM,IAAA,EAAA,CAAA,cAAA,CAAA,CAAA,EAAA,YAAA,EAAA,CAAA;AACE,IAAA,EAAA,CAAA,MAAA,CAAA,CAAA;AACF,IAAA,EAAA,CAAA,YAAA;;;;;AAF2D,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA;AACzD,IAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,IAAA,EAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,SAAA,CAAA,IAAA,EAAA,GAAA;;;;ADYR,OAAM,MAAO,sBAAP,CAA6B;AASjC,EAAA,WAAA,GAAA;AARA,SAAA,SAAA,GAAY,IAAI,WAAJ,EAAZ;AACA,SA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A,EAAA,CAAA,WAAA,CAAA,CAAA,EAAA,CAAA,EAAA,GAAA,CAAA,eAAA,CAAA","sourcesContent":["import { Component, 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\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 options: User[] = [\n {name: 'Mary'},\n {name: 'Shelley'},\n {name: 'Igor'}\n ];\n \n filteredOptions: Observable<User[]>;\n constructor(){}\n \n ngOnInit() {\n this.filteredOptions = this.myControl.valueChanges\n .pipe(\n startWith(''),\n map(value => typeof value === 'string' ? value : value.name),\n map(name => name ? this._filter(name) : this.options.slice())\n );\n }\n\n displayFn(user: User): string {\n return user && user.name ? user.name : '';\n }\n\n private _filter(name: string): User[] {\n const filterValue = name.toLowerCase();\n\n return this.options.filter(option => option.name.toLowerCase().includes(filterValue));\n }\n\n}\n","<form class=\"example-form\">\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Assignee</mat-label>\n <input type=\"text\" matInput [formControl]=\"myControl\" [matAutocomplete]=\"auto\">\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n {{option.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.