1 line
6.1 KiB
JSON
1 line
6.1 KiB
JSON
|
{"ast":null,"code":"var __decorate = this && this.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport __NG_CLI_RESOURCE__0 from \"./iletisim.component.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./iletisim.component.css?ngResource\";\nimport { Component } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, Validators } from '@angular/forms';\nimport { ServicesService } from '../services.service';\nlet IletisimComponent = class IletisimComponent {\n constructor(builder, contact) {\n this.builder = builder;\n this.contact = contact;\n this.lat = 37.00850309346716;\n this.lng = 27.32525836435135;\n }\n ngOnInit() {\n this.FormData = this.builder.group({\n Name: new UntypedFormControl('', [Validators.required]),\n Email: new UntypedFormControl('', [Validators.compose([Validators.required, Validators.email])]),\n Phone: new UntypedFormControl('', [Validators.pattern(\"^[0-9]*$\")]),\n Message: new UntypedFormControl('', [Validators.required])\n });\n }\n get Name() {\n return this.FormData.get('Name');\n }\n get Email() {\n return this.FormData.get('Email');\n }\n get Phone() {\n return this.FormData.get('Phone');\n }\n get Message() {\n return this.FormData.get('Message');\n }\n onSubmit(FormData) {\n console.log(FormData);\n this.contact.PostMessage(FormData).subscribe(response => {\n location.href = 'https://mailthis.to/confirm';\n console.log(response);\n }, error => {\n console.warn(error.responseText);\n console.log({\n error\n });\n });\n }\n static {\n this.ctorParameters = () => [{\n type: UntypedFormBuilder\n }, {\n type: ServicesService\n }];\n }\n};\nIletisimComponent = __decorate([Component({\n selector: 'app-iletisim',\n template: __NG_CLI_RESOURCE__0,\n styles: [__NG_CLI_RESOURCE__1]\n})], IletisimComponent);\nexport { IletisimComponent };","map":{"version":3,"names":["Component","UntypedFormBuilder","UntypedFormControl","Validators","ServicesService","IletisimComponent","constructor","builder","contact","lat","lng","ngOnInit","FormData","group","Name","required","Email","compose","email","Phone","pattern","Message","get","onSubmit","console","log","PostMessage","subscribe","response","location","href","error","warn","responseText","__decorate","selector","template","__NG_CLI_RESOURCE__0"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/src/app/iletisim/iletisim.component.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\nimport { ServicesService } from '../services.service';\n\n@Component({\n selector: 'app-iletisim',\n templateUrl: './iletisim.component.html',\n styleUrls: ['./iletisim.component.css']\n})\nexport class IletisimComponent implements OnInit{\n lat = 37.00850309346716;\n lng = 27.32525836435135;\n\n FormData: UntypedFormGroup;\n constructor(private builder: UntypedFormBuilder, private contact: ServicesService) { }\n\n ngOnInit() {\n this.FormData = this.builder.group({\n Name: new UntypedFormControl('', [Validators.required]),\n Email: new UntypedFormControl('', [Validators.compose([Validators.required, Validators.email])]),\n Phone: new UntypedFormControl('', [Validators.pattern(\"^[0-9]*$\")]),\n Message: new UntypedFormControl('', [Validators.required])\n });\n }\n\n get Name() {return this.FormData.get('Name'); }\n get Email() {return this.FormData.get('Emai
|