@tehw0lf/contact-form 0.0.12 → 0.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,8 +40,8 @@ The contact form component takes an apiURL and an email as input. By default, th
40
40
  In your component, set the `emailBackendURL` and `yourEmailAddress` properties. The naming of these variables is arbitrary:
41
41
 
42
42
  ```ts
43
- emailBackendURL = 'https://forwardmethis.com/';
44
- yourEmailAddress = 'my@mail.com'; //this is optional, if your API URL doesn't require an email address parameter
43
+ emailBackendURL; //'https://forwardmethis.com/';
44
+ yourEmailAddress; //'my@mail.com'; //this is optional, if your API URL doesn't require an email address parameter
45
45
  ```
46
46
 
47
47
  This contact form will send a POST request to the API, containing the following data structure:
@@ -58,16 +58,47 @@ You can of course use your own backend with this data structure, as the API-URL
58
58
 
59
59
  ## Theming
60
60
 
61
- The colors of card background, button and text as well as the backdrop filter can be customized with optional input parameters:
61
+ The styles of form background, button, input and text can be customized with optional input parameters:
62
62
 
63
63
  ```ts
64
- backgroundColor; //default: 'rgba(34, 34, 34, 0.75)';
65
- backdropFilter; //default: 'blur(50px)';
66
- buttonColor; //default: '#cc7832';
67
- buttonBackgroundColor; //default: ''
68
- buttonTextColor; //default: '#cc7832';
69
- labelColor; //default: 'lightgray';
70
- textColor; //default: 'lightgray';
64
+ buttonStyle; /* {
65
+ border: 'none',
66
+ 'background-color': '#333333',
67
+ color: '#cc7832'
68
+ }*/
69
+
70
+ formStyle; /* {
71
+ color: '#437da8',
72
+ 'background-color': 'rgba(34, 34, 34, 0.75)',
73
+ 'backdrop-filter': 'blur(50px)',
74
+ 'box-shadow': '0 2px 10px rgba(0, 0, 0, 0.075)'
75
+ }*/
76
+
77
+ inputStyle; /* {
78
+ border: 'none',
79
+ color: '#282b2e',
80
+ 'background-color': '#fff'
81
+ }*/
82
+
83
+ textStyle; //{ color: '#cc7832' };
84
+ ```
85
+
86
+ ## Text
87
+
88
+ You can specify your own texts for the fields and labels, or leave the default English version
89
+
90
+ ```ts
91
+ nameLabel; //'Your Name';
92
+
93
+ emailAddressLabel; //'Your E-Mail Address';
94
+
95
+ messageLabel; //'Your Message';
96
+
97
+ sendText; //'Send';
98
+
99
+ sendSuccessfulText; //'E-Mail successfully sent';
100
+
101
+ sendErrorText; //'Send error';
71
102
  ```
72
103
 
73
104
  ## Development
@@ -1,5 +1,5 @@
1
- import { Component, Input } from '@angular/core';
2
- import { FormBuilder, FormControl, Validators } from '@angular/forms';
1
+ import { Component, Input, ViewEncapsulation } from '@angular/core';
2
+ import { UntypedFormBuilder, UntypedFormControl, Validators } from '@angular/forms';
3
3
  import { Subject } from 'rxjs';
4
4
  import { takeUntil, tap } from 'rxjs/operators';
5
5
  import { EmailApiService } from '../email-api.service';
@@ -7,10 +7,33 @@ import * as i0 from "@angular/core";
7
7
  import * as i1 from "@angular/forms";
8
8
  import * as i2 from "../email-api.service";
9
9
  import * as i3 from "@angular/common";
10
+ import * as i4 from "@angular/material/form-field";
11
+ import * as i5 from "@angular/material/input";
10
12
  export class ContactFormComponent {
11
13
  constructor(builder, emailService) {
12
14
  this.builder = builder;
13
15
  this.emailService = emailService;
16
+ this.buttonStyle = {
17
+ 'background-color': '#333333',
18
+ border: 'none',
19
+ color: '#cc7832'
20
+ };
21
+ this.formStyle = {
22
+ color: '#437da8',
23
+ 'background-color': 'rgba(34, 34, 34, 0.75)',
24
+ 'backdrop-filter': 'blur(50px)',
25
+ 'box-shadow': '0 2px 10px rgba(0, 0, 0, 0.075)'
26
+ };
27
+ this.inputStyle = {
28
+ color: '#282b2e'
29
+ };
30
+ this.textStyle = { color: '#cc7832' };
31
+ this.nameLabel = 'Your Name';
32
+ this.emailAddressLabel = 'Your E-Mail Address';
33
+ this.messageLabel = 'Your Message';
34
+ this.sendText = 'Send';
35
+ this.sendSuccessfulText = 'E-Mail successfully sent';
36
+ this.sendErrorText = 'Send error';
14
37
  this.apiURL = 'https://forwardmethis.com/';
15
38
  this.email = '';
16
39
  this.emailSent = new Subject();
@@ -18,9 +41,9 @@ export class ContactFormComponent {
18
41
  this.unsubscribe$ = new Subject();
19
42
  this.emailSent.next(null);
20
43
  this.formGroup = this.builder.group({
21
- name: new FormControl('', [Validators.required]),
22
- email: new FormControl('', [Validators.required, Validators.email]),
23
- message: new FormControl('', [Validators.required])
44
+ name: new UntypedFormControl('', [Validators.required]),
45
+ email: new UntypedFormControl('', [Validators.required, Validators.email]),
46
+ message: new UntypedFormControl('', [Validators.required])
24
47
  });
25
48
  }
26
49
  ngOnDestroy() {
@@ -41,14 +64,34 @@ export class ContactFormComponent {
41
64
  .subscribe();
42
65
  }
43
66
  }
44
- ContactFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormComponent, deps: [{ token: i1.FormBuilder }, { token: i2.EmailApiService }], target: i0.ɵɵFactoryTarget.Component });
45
- ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: ContactFormComponent, selector: "contact-form", inputs: { apiURL: "apiURL", email: "email" }, ngImport: i0, template: "<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n", styles: [".contact-form{background-color:#fff;max-width:500px;margin:auto;padding:40px;box-shadow:0 2px 10px #00000013;box-sizing:border-box}.form-button{display:block;border:1px solid #ced4da;border-radius:.25rem;width:96%;padding:.375rem .75rem}.form-control{display:block;width:90%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#282b2e;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;margin-top:.5rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-group{margin-bottom:1rem}.form-status{margin-top:2rem}textarea{overflow:auto;resize:vertical}\n"], directives: [{ type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe } });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormComponent, decorators: [{
67
+ ContactFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i2.EmailApiService }], target: i0.ɵɵFactoryTarget.Component });
68
+ ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ContactFormComponent, selector: "contact-form", inputs: { buttonStyle: "buttonStyle", formStyle: "formStyle", inputStyle: "inputStyle", textStyle: "textStyle", nameLabel: "nameLabel", emailAddressLabel: "emailAddressLabel", messageLabel: "messageLabel", sendText: "sendText", sendSuccessfulText: "sendSuccessfulText", sendErrorText: "sendErrorText", apiURL: "apiURL", email: "email" }, ngImport: i0, template: "<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n", styles: [".contact-form{max-width:500px;margin:auto;padding:40px;box-sizing:border-box}.form-button{margin-top:3rem;display:block;border-radius:.25rem;width:98%;padding:.375rem .75rem}.form-status{margin-top:2rem}textarea{color:inherit!important;background:none!important;overflow:auto;resize:vertical}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.form-field{align-self:center;width:98%}.form-field:last-of-type{margin-top:1rem}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormComponent, decorators: [{
47
70
  type: Component,
48
- args: [{ selector: 'contact-form', template: "<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n", styles: [".contact-form{background-color:#fff;max-width:500px;margin:auto;padding:40px;box-shadow:0 2px 10px #00000013;box-sizing:border-box}.form-button{display:block;border:1px solid #ced4da;border-radius:.25rem;width:96%;padding:.375rem .75rem}.form-control{display:block;width:90%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#282b2e;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;margin-top:.5rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-group{margin-bottom:1rem}.form-status{margin-top:2rem}textarea{overflow:auto;resize:vertical}\n"] }]
49
- }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: i2.EmailApiService }]; }, propDecorators: { apiURL: [{
71
+ args: [{ selector: 'contact-form', encapsulation: ViewEncapsulation.None, template: "<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n", styles: [".contact-form{max-width:500px;margin:auto;padding:40px;box-sizing:border-box}.form-button{margin-top:3rem;display:block;border-radius:.25rem;width:98%;padding:.375rem .75rem}.form-status{margin-top:2rem}textarea{color:inherit!important;background:none!important;overflow:auto;resize:vertical}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.form-field{align-self:center;width:98%}.form-field:last-of-type{margin-top:1rem}\n"] }]
72
+ }], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i2.EmailApiService }]; }, propDecorators: { buttonStyle: [{
73
+ type: Input
74
+ }], formStyle: [{
75
+ type: Input
76
+ }], inputStyle: [{
77
+ type: Input
78
+ }], textStyle: [{
79
+ type: Input
80
+ }], nameLabel: [{
81
+ type: Input
82
+ }], emailAddressLabel: [{
83
+ type: Input
84
+ }], messageLabel: [{
85
+ type: Input
86
+ }], sendText: [{
87
+ type: Input
88
+ }], sendSuccessfulText: [{
89
+ type: Input
90
+ }], sendErrorText: [{
91
+ type: Input
92
+ }], apiURL: [{
50
93
  type: Input
51
94
  }], email: [{
52
95
  type: Input
53
96
  }] } });
54
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFjdC1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29udGFjdC1mb3JtL3NyYy9saWIvY29udGFjdC1mb3JtL2NvbnRhY3QtZm9ybS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8u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rpdj5cbiAgPGRpdlxuICAgIFtuZ1N0eWxlXT1cInRleHRTdHlsZVwiXG4gICAgY2xhc3M9XCJmb3JtLXN0YXR1c1wiXG4gICAgKm5nSWY9XCIoZW1haWxTZW50JCB8IGFzeW5jKSA9PT0gZmFsc2VcIlxuICA+XG4gICAge3sgc2VuZEVycm9yVGV4dCB9fVxuICA8L2Rpdj5cbjwvZm9ybT5cbiJdfQ==
@@ -2,21 +2,41 @@ import { CommonModule } from '@angular/common';
2
2
  import { HttpClientModule } from '@angular/common/http';
3
3
  import { NgModule } from '@angular/core';
4
4
  import { ReactiveFormsModule } from '@angular/forms';
5
+ import { MatFormFieldModule } from '@angular/material/form-field';
6
+ import { MatInputModule } from '@angular/material/input';
7
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5
8
  import { ContactFormComponent } from './contact-form/contact-form.component';
6
9
  import { EmailApiService } from './email-api.service';
7
10
  import * as i0 from "@angular/core";
8
11
  export class ContactFormModule {
9
12
  }
10
- ContactFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
- ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, declarations: [ContactFormComponent], imports: [CommonModule, HttpClientModule, ReactiveFormsModule], exports: [ContactFormComponent] });
12
- ContactFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, providers: [EmailApiService], imports: [[CommonModule, HttpClientModule, ReactiveFormsModule]] });
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, decorators: [{
13
+ ContactFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
14
+ ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, declarations: [ContactFormComponent], imports: [CommonModule,
15
+ HttpClientModule,
16
+ BrowserAnimationsModule,
17
+ ReactiveFormsModule,
18
+ MatFormFieldModule,
19
+ MatInputModule], exports: [ContactFormComponent] });
20
+ ContactFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, providers: [EmailApiService], imports: [CommonModule,
21
+ HttpClientModule,
22
+ BrowserAnimationsModule,
23
+ ReactiveFormsModule,
24
+ MatFormFieldModule,
25
+ MatInputModule] });
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, decorators: [{
14
27
  type: NgModule,
15
28
  args: [{
16
- imports: [CommonModule, HttpClientModule, ReactiveFormsModule],
29
+ imports: [
30
+ CommonModule,
31
+ HttpClientModule,
32
+ BrowserAnimationsModule,
33
+ ReactiveFormsModule,
34
+ MatFormFieldModule,
35
+ MatInputModule
36
+ ],
17
37
  declarations: [ContactFormComponent],
18
38
  exports: [ContactFormComponent],
19
- providers: [EmailApiService],
39
+ providers: [EmailApiService]
20
40
  }]
21
41
  }] });
22
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFjdC1mb3JtLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29udGFjdC1mb3JtL3NyYy9saWIvY29udGFjdC1mb3JtLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQ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ailApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
25
- EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, providedIn: 'root' });
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, decorators: [{
24
+ EmailApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
25
+ EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, providedIn: 'root' });
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, decorators: [{
27
27
  type: Injectable,
28
28
  args: [{
29
29
  providedIn: 'root'
@@ -3,9 +3,14 @@ import { CommonModule } from '@angular/common';
3
3
  import * as i1 from '@angular/common/http';
4
4
  import { HttpHeaders, HttpClientModule } from '@angular/common/http';
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, Component, Input, NgModule } from '@angular/core';
6
+ import { Injectable, Component, ViewEncapsulation, Input, NgModule } from '@angular/core';
7
7
  import * as i1$1 from '@angular/forms';
8
- import { FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
8
+ import { UntypedFormControl, Validators, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i4 from '@angular/material/form-field';
10
+ import { MatFormFieldModule } from '@angular/material/form-field';
11
+ import * as i5 from '@angular/material/input';
12
+ import { MatInputModule } from '@angular/material/input';
13
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
9
14
  import { of, Subject } from 'rxjs';
10
15
  import { map, catchError, tap, takeUntil } from 'rxjs/operators';
11
16
 
@@ -26,9 +31,9 @@ class EmailApiService {
26
31
  }));
27
32
  }
28
33
  }
29
- EmailApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
30
- EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, providedIn: 'root' });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, decorators: [{
34
+ EmailApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
35
+ EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, providedIn: 'root' });
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, decorators: [{
32
37
  type: Injectable,
33
38
  args: [{
34
39
  providedIn: 'root'
@@ -39,6 +44,27 @@ class ContactFormComponent {
39
44
  constructor(builder, emailService) {
40
45
  this.builder = builder;
41
46
  this.emailService = emailService;
47
+ this.buttonStyle = {
48
+ 'background-color': '#333333',
49
+ border: 'none',
50
+ color: '#cc7832'
51
+ };
52
+ this.formStyle = {
53
+ color: '#437da8',
54
+ 'background-color': 'rgba(34, 34, 34, 0.75)',
55
+ 'backdrop-filter': 'blur(50px)',
56
+ 'box-shadow': '0 2px 10px rgba(0, 0, 0, 0.075)'
57
+ };
58
+ this.inputStyle = {
59
+ color: '#282b2e'
60
+ };
61
+ this.textStyle = { color: '#cc7832' };
62
+ this.nameLabel = 'Your Name';
63
+ this.emailAddressLabel = 'Your E-Mail Address';
64
+ this.messageLabel = 'Your Message';
65
+ this.sendText = 'Send';
66
+ this.sendSuccessfulText = 'E-Mail successfully sent';
67
+ this.sendErrorText = 'Send error';
42
68
  this.apiURL = 'https://forwardmethis.com/';
43
69
  this.email = '';
44
70
  this.emailSent = new Subject();
@@ -46,9 +72,9 @@ class ContactFormComponent {
46
72
  this.unsubscribe$ = new Subject();
47
73
  this.emailSent.next(null);
48
74
  this.formGroup = this.builder.group({
49
- name: new FormControl('', [Validators.required]),
50
- email: new FormControl('', [Validators.required, Validators.email]),
51
- message: new FormControl('', [Validators.required])
75
+ name: new UntypedFormControl('', [Validators.required]),
76
+ email: new UntypedFormControl('', [Validators.required, Validators.email]),
77
+ message: new UntypedFormControl('', [Validators.required])
52
78
  });
53
79
  }
54
80
  ngOnDestroy() {
@@ -69,12 +95,32 @@ class ContactFormComponent {
69
95
  .subscribe();
70
96
  }
71
97
  }
72
- ContactFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: EmailApiService }], target: i0.ɵɵFactoryTarget.Component });
73
- ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: ContactFormComponent, selector: "contact-form", inputs: { apiURL: "apiURL", email: "email" }, ngImport: i0, template: "<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n", styles: [".contact-form{background-color:#fff;max-width:500px;margin:auto;padding:40px;box-shadow:0 2px 10px #00000013;box-sizing:border-box}.form-button{display:block;border:1px solid #ced4da;border-radius:.25rem;width:96%;padding:.375rem .75rem}.form-control{display:block;width:90%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#282b2e;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;margin-top:.5rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-group{margin-bottom:1rem}.form-status{margin-top:2rem}textarea{overflow:auto;resize:vertical}\n"], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe } });
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormComponent, decorators: [{
98
+ ContactFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormComponent, deps: [{ token: i1$1.UntypedFormBuilder }, { token: EmailApiService }], target: i0.ɵɵFactoryTarget.Component });
99
+ ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ContactFormComponent, selector: "contact-form", inputs: { buttonStyle: "buttonStyle", formStyle: "formStyle", inputStyle: "inputStyle", textStyle: "textStyle", nameLabel: "nameLabel", emailAddressLabel: "emailAddressLabel", messageLabel: "messageLabel", sendText: "sendText", sendSuccessfulText: "sendSuccessfulText", sendErrorText: "sendErrorText", apiURL: "apiURL", email: "email" }, ngImport: i0, template: "<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n", styles: [".contact-form{max-width:500px;margin:auto;padding:40px;box-sizing:border-box}.form-button{margin-top:3rem;display:block;border-radius:.25rem;width:98%;padding:.375rem .75rem}.form-status{margin-top:2rem}textarea{color:inherit!important;background:none!important;overflow:auto;resize:vertical}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.form-field{align-self:center;width:98%}.form-field:last-of-type{margin-top:1rem}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormComponent, decorators: [{
75
101
  type: Component,
76
- args: [{ selector: 'contact-form', template: "<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n", styles: [".contact-form{background-color:#fff;max-width:500px;margin:auto;padding:40px;box-shadow:0 2px 10px #00000013;box-sizing:border-box}.form-button{display:block;border:1px solid #ced4da;border-radius:.25rem;width:96%;padding:.375rem .75rem}.form-control{display:block;width:90%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#282b2e;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;margin-top:.5rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-group{margin-bottom:1rem}.form-status{margin-top:2rem}textarea{overflow:auto;resize:vertical}\n"] }]
77
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: EmailApiService }]; }, propDecorators: { apiURL: [{
102
+ args: [{ selector: 'contact-form', encapsulation: ViewEncapsulation.None, template: "<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n", styles: [".contact-form{max-width:500px;margin:auto;padding:40px;box-sizing:border-box}.form-button{margin-top:3rem;display:block;border-radius:.25rem;width:98%;padding:.375rem .75rem}.form-status{margin-top:2rem}textarea{color:inherit!important;background:none!important;overflow:auto;resize:vertical}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.form-field{align-self:center;width:98%}.form-field:last-of-type{margin-top:1rem}\n"] }]
103
+ }], ctorParameters: function () { return [{ type: i1$1.UntypedFormBuilder }, { type: EmailApiService }]; }, propDecorators: { buttonStyle: [{
104
+ type: Input
105
+ }], formStyle: [{
106
+ type: Input
107
+ }], inputStyle: [{
108
+ type: Input
109
+ }], textStyle: [{
110
+ type: Input
111
+ }], nameLabel: [{
112
+ type: Input
113
+ }], emailAddressLabel: [{
114
+ type: Input
115
+ }], messageLabel: [{
116
+ type: Input
117
+ }], sendText: [{
118
+ type: Input
119
+ }], sendSuccessfulText: [{
120
+ type: Input
121
+ }], sendErrorText: [{
122
+ type: Input
123
+ }], apiURL: [{
78
124
  type: Input
79
125
  }], email: [{
80
126
  type: Input
@@ -82,16 +128,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
82
128
 
83
129
  class ContactFormModule {
84
130
  }
85
- ContactFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
86
- ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, declarations: [ContactFormComponent], imports: [CommonModule, HttpClientModule, ReactiveFormsModule], exports: [ContactFormComponent] });
87
- ContactFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, providers: [EmailApiService], imports: [[CommonModule, HttpClientModule, ReactiveFormsModule]] });
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, decorators: [{
131
+ ContactFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
132
+ ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, declarations: [ContactFormComponent], imports: [CommonModule,
133
+ HttpClientModule,
134
+ BrowserAnimationsModule,
135
+ ReactiveFormsModule,
136
+ MatFormFieldModule,
137
+ MatInputModule], exports: [ContactFormComponent] });
138
+ ContactFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, providers: [EmailApiService], imports: [CommonModule,
139
+ HttpClientModule,
140
+ BrowserAnimationsModule,
141
+ ReactiveFormsModule,
142
+ MatFormFieldModule,
143
+ MatInputModule] });
144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, decorators: [{
89
145
  type: NgModule,
90
146
  args: [{
91
- imports: [CommonModule, HttpClientModule, ReactiveFormsModule],
147
+ imports: [
148
+ CommonModule,
149
+ HttpClientModule,
150
+ BrowserAnimationsModule,
151
+ ReactiveFormsModule,
152
+ MatFormFieldModule,
153
+ MatInputModule
154
+ ],
92
155
  declarations: [ContactFormComponent],
93
156
  exports: [ContactFormComponent],
94
- providers: [EmailApiService],
157
+ providers: [EmailApiService]
95
158
  }]
96
159
  }] });
97
160
 
@@ -1 +1 @@
1
- {"version":3,"file":"tehw0lf-contact-form.mjs","sources":["../../../../libs/contact-form/src/lib/email-api.service.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.html","../../../../libs/contact-form/src/lib/contact-form.module.ts","../../../../libs/contact-form/src/tehw0lf-contact-form.ts"],"sourcesContent":["import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EmailApiService {\n httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n constructor(private http: HttpClient) {}\n\n sendEmail(apiURL: string, data: any): Observable<any> {\n return this.http.post(apiURL, JSON.stringify(data), this.httpOptions).pipe(\n map((response: any) => {\n return response;\n }),\n catchError((error: any) => {\n return of(error.statusText);\n })\n );\n }\n}\n","import { Component, Input, OnDestroy } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { takeUntil, tap } from 'rxjs/operators';\n\nimport { EmailApiService } from '../email-api.service';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'contact-form',\n templateUrl: './contact-form.component.html',\n styleUrls: ['./contact-form.component.scss']\n})\nexport class ContactFormComponent implements OnDestroy {\n @Input() apiURL = 'https://forwardmethis.com/';\n @Input() email = '';\n\n formGroup: FormGroup;\n emailSent: Subject<boolean | null> = new Subject();\n emailSent$ = this.emailSent.asObservable();\n\n private unsubscribe$: Subject<void> = new Subject();\n\n constructor(\n private builder: FormBuilder,\n private emailService: EmailApiService\n ) {\n this.emailSent.next(null);\n this.formGroup = this.builder.group({\n name: new FormControl('', [Validators.required]),\n email: new FormControl('', [Validators.required, Validators.email]),\n message: new FormControl('', [Validators.required])\n });\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n submitFormData(formData: FormGroup) {\n this.emailService\n .sendEmail(`${this.apiURL}${this.email}`, formData.value)\n .pipe(\n tap((response: string) => {\n if (response === 'OK') {\n this.emailSent.next(true);\n } else {\n this.emailSent.next(false);\n }\n }),\n takeUntil(this.unsubscribe$)\n )\n .subscribe();\n }\n}\n","<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n","import { CommonModule } from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { ContactFormComponent } from './contact-form/contact-form.component';\nimport { EmailApiService } from './email-api.service';\n\n@NgModule({\n imports: [CommonModule, HttpClientModule, ReactiveFormsModule],\n declarations: [ContactFormComponent],\n exports: [ContactFormComponent],\n providers: [EmailApiService],\n})\nexport class ContactFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAQa,eAAe;IAM1B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QALpC,gBAAW,GAAG;YACZ,OAAO,EAAE,IAAI,WAAW,CAAC;gBACvB,cAAc,EAAE,kBAAkB;aACnC,CAAC;SACH,CAAC;KACsC;IAExC,SAAS,CAAC,MAAc,EAAE,IAAS;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CACxE,GAAG,CAAC,CAAC,QAAa;YAChB,OAAO,QAAQ,CAAC;SACjB,CAAC,EACF,UAAU,CAAC,CAAC,KAAU;YACpB,OAAO,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;SAC7B,CAAC,CACH,CAAC;KACH;;4GAjBU,eAAe;gHAAf,eAAe,cAFd,MAAM;2FAEP,eAAe;kBAH3B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;MCMY,oBAAoB;IAU/B,YACU,OAAoB,EACpB,YAA6B;QAD7B,YAAO,GAAP,OAAO,CAAa;QACpB,iBAAY,GAAZ,YAAY,CAAiB;QAX9B,WAAM,GAAG,4BAA4B,CAAC;QACtC,UAAK,GAAG,EAAE,CAAC;QAGpB,cAAS,GAA4B,IAAI,OAAO,EAAE,CAAC;QACnD,eAAU,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;QAEnC,iBAAY,GAAkB,IAAI,OAAO,EAAE,CAAC;QAMlD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAA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EAAE,gBAAgB,EAAE,mBAAmB,CAAC;2FAKnD,iBAAiB;kBAN7B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;oBAC9D,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,SAAS,EAAE,CAAC,eAAe,CAAC;iBAC7B;;;ACbD;;;;;;"}
1
+ {"version":3,"file":"tehw0lf-contact-form.mjs","sources":["../../../../libs/contact-form/src/lib/email-api.service.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.html","../../../../libs/contact-form/src/lib/contact-form.module.ts","../../../../libs/contact-form/src/tehw0lf-contact-form.ts"],"sourcesContent":["import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EmailApiService {\n httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n constructor(private http: HttpClient) {}\n\n sendEmail(apiURL: string, data: any): Observable<any> {\n return this.http.post(apiURL, JSON.stringify(data), this.httpOptions).pipe(\n map((response: any) => {\n return response;\n }),\n catchError((error: any) => {\n return of(error.statusText);\n })\n );\n }\n}\n","import { Component, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { takeUntil, tap } from 'rxjs/operators';\n\nimport { EmailApiService } from '../email-api.service';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'contact-form',\n templateUrl: './contact-form.component.html',\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./contact-form.component.scss']\n})\nexport class ContactFormComponent implements OnDestroy {\n @Input() buttonStyle = {\n 'background-color': '#333333',\n border: 'none',\n color: '#cc7832'\n };\n\n @Input() formStyle = {\n color: '#437da8',\n 'background-color': 'rgba(34, 34, 34, 0.75)',\n 'backdrop-filter': 'blur(50px)',\n 'box-shadow': '0 2px 10px rgba(0, 0, 0, 0.075)'\n };\n\n @Input() inputStyle = {\n color: '#282b2e'\n };\n\n @Input() textStyle = { color: '#cc7832' };\n\n @Input() nameLabel = 'Your Name';\n\n @Input() emailAddressLabel = 'Your E-Mail Address';\n\n @Input() messageLabel = 'Your Message';\n\n @Input() sendText = 'Send';\n\n @Input() sendSuccessfulText = 'E-Mail successfully sent';\n\n @Input() sendErrorText = 'Send error';\n\n @Input() apiURL = 'https://forwardmethis.com/';\n @Input() email = '';\n\n formGroup: UntypedFormGroup;\n emailSent: Subject<boolean | null> = new Subject();\n emailSent$ = this.emailSent.asObservable();\n\n private unsubscribe$: Subject<void> = new Subject();\n\n constructor(\n private builder: UntypedFormBuilder,\n private emailService: EmailApiService\n ) {\n this.emailSent.next(null);\n this.formGroup = this.builder.group({\n name: new UntypedFormControl('', [Validators.required]),\n email: new UntypedFormControl('', [Validators.required, Validators.email]),\n message: new UntypedFormControl('', [Validators.required])\n });\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n submitFormData(formData: UntypedFormGroup) {\n this.emailService\n .sendEmail(`${this.apiURL}${this.email}`, formData.value)\n .pipe(\n tap((response: string) => {\n if (response === 'OK') {\n this.emailSent.next(true);\n } else {\n this.emailSent.next(false);\n }\n }),\n takeUntil(this.unsubscribe$)\n )\n .subscribe();\n }\n}\n","<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n","import { CommonModule } from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\nimport { ContactFormComponent } from './contact-form/contact-form.component';\nimport { EmailApiService } from './email-api.service';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n BrowserAnimationsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatInputModule\n ],\n declarations: [ContactFormComponent],\n exports: [ContactFormComponent],\n providers: [EmailApiService]\n})\nexport class ContactFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport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AAA;;;ACvBD;;AAEG;;;;"}
@@ -3,9 +3,14 @@ import { CommonModule } from '@angular/common';
3
3
  import * as i1 from '@angular/common/http';
4
4
  import { HttpHeaders, HttpClientModule } from '@angular/common/http';
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, Component, Input, NgModule } from '@angular/core';
6
+ import { Injectable, Component, ViewEncapsulation, Input, NgModule } from '@angular/core';
7
7
  import * as i1$1 from '@angular/forms';
8
- import { FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
8
+ import { UntypedFormControl, Validators, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i4 from '@angular/material/form-field';
10
+ import { MatFormFieldModule } from '@angular/material/form-field';
11
+ import * as i5 from '@angular/material/input';
12
+ import { MatInputModule } from '@angular/material/input';
13
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
9
14
  import { of, Subject } from 'rxjs';
10
15
  import { map, catchError, tap, takeUntil } from 'rxjs/operators';
11
16
 
@@ -26,9 +31,9 @@ class EmailApiService {
26
31
  }));
27
32
  }
28
33
  }
29
- EmailApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
30
- EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, providedIn: 'root' });
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: EmailApiService, decorators: [{
34
+ EmailApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
35
+ EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, providedIn: 'root' });
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: EmailApiService, decorators: [{
32
37
  type: Injectable,
33
38
  args: [{
34
39
  providedIn: 'root'
@@ -39,6 +44,27 @@ class ContactFormComponent {
39
44
  constructor(builder, emailService) {
40
45
  this.builder = builder;
41
46
  this.emailService = emailService;
47
+ this.buttonStyle = {
48
+ 'background-color': '#333333',
49
+ border: 'none',
50
+ color: '#cc7832'
51
+ };
52
+ this.formStyle = {
53
+ color: '#437da8',
54
+ 'background-color': 'rgba(34, 34, 34, 0.75)',
55
+ 'backdrop-filter': 'blur(50px)',
56
+ 'box-shadow': '0 2px 10px rgba(0, 0, 0, 0.075)'
57
+ };
58
+ this.inputStyle = {
59
+ color: '#282b2e'
60
+ };
61
+ this.textStyle = { color: '#cc7832' };
62
+ this.nameLabel = 'Your Name';
63
+ this.emailAddressLabel = 'Your E-Mail Address';
64
+ this.messageLabel = 'Your Message';
65
+ this.sendText = 'Send';
66
+ this.sendSuccessfulText = 'E-Mail successfully sent';
67
+ this.sendErrorText = 'Send error';
42
68
  this.apiURL = 'https://forwardmethis.com/';
43
69
  this.email = '';
44
70
  this.emailSent = new Subject();
@@ -46,9 +72,9 @@ class ContactFormComponent {
46
72
  this.unsubscribe$ = new Subject();
47
73
  this.emailSent.next(null);
48
74
  this.formGroup = this.builder.group({
49
- name: new FormControl('', [Validators.required]),
50
- email: new FormControl('', [Validators.required, Validators.email]),
51
- message: new FormControl('', [Validators.required])
75
+ name: new UntypedFormControl('', [Validators.required]),
76
+ email: new UntypedFormControl('', [Validators.required, Validators.email]),
77
+ message: new UntypedFormControl('', [Validators.required])
52
78
  });
53
79
  }
54
80
  ngOnDestroy() {
@@ -69,12 +95,32 @@ class ContactFormComponent {
69
95
  .subscribe();
70
96
  }
71
97
  }
72
- ContactFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: EmailApiService }], target: i0.ɵɵFactoryTarget.Component });
73
- ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.0", type: ContactFormComponent, selector: "contact-form", inputs: { apiURL: "apiURL", email: "email" }, ngImport: i0, template: "<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n", styles: [".contact-form{background-color:#fff;max-width:500px;margin:auto;padding:40px;box-shadow:0 2px 10px #00000013;box-sizing:border-box}.form-button{display:block;border:1px solid #ced4da;border-radius:.25rem;width:96%;padding:.375rem .75rem}.form-control{display:block;width:90%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#282b2e;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;margin-top:.5rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-group{margin-bottom:1rem}.form-status{margin-top:2rem}textarea{overflow:auto;resize:vertical}\n"], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe } });
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormComponent, decorators: [{
98
+ ContactFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormComponent, deps: [{ token: i1$1.UntypedFormBuilder }, { token: EmailApiService }], target: i0.ɵɵFactoryTarget.Component });
99
+ ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ContactFormComponent, selector: "contact-form", inputs: { buttonStyle: "buttonStyle", formStyle: "formStyle", inputStyle: "inputStyle", textStyle: "textStyle", nameLabel: "nameLabel", emailAddressLabel: "emailAddressLabel", messageLabel: "messageLabel", sendText: "sendText", sendSuccessfulText: "sendSuccessfulText", sendErrorText: "sendErrorText", apiURL: "apiURL", email: "email" }, ngImport: i0, template: "<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n", styles: [".contact-form{max-width:500px;margin:auto;padding:40px;box-sizing:border-box}.form-button{margin-top:3rem;display:block;border-radius:.25rem;width:98%;padding:.375rem .75rem}.form-status{margin-top:2rem}textarea{color:inherit!important;background:none!important;overflow:auto;resize:vertical}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.form-field{align-self:center;width:98%}.form-field:last-of-type{margin-top:1rem}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormComponent, decorators: [{
75
101
  type: Component,
76
- args: [{ selector: 'contact-form', template: "<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n", styles: [".contact-form{background-color:#fff;max-width:500px;margin:auto;padding:40px;box-shadow:0 2px 10px #00000013;box-sizing:border-box}.form-button{display:block;border:1px solid #ced4da;border-radius:.25rem;width:96%;padding:.375rem .75rem}.form-control{display:block;width:90%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#282b2e;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;margin-top:.5rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-group{margin-bottom:1rem}.form-status{margin-top:2rem}textarea{overflow:auto;resize:vertical}\n"] }]
77
- }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: EmailApiService }]; }, propDecorators: { apiURL: [{
102
+ args: [{ selector: 'contact-form', encapsulation: ViewEncapsulation.None, template: "<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n", styles: [".contact-form{max-width:500px;margin:auto;padding:40px;box-sizing:border-box}.form-button{margin-top:3rem;display:block;border-radius:.25rem;width:98%;padding:.375rem .75rem}.form-status{margin-top:2rem}textarea{color:inherit!important;background:none!important;overflow:auto;resize:vertical}.mat-form-field-appearance-outline .mat-form-field-infix{border:0;padding:1em 0 .5em}.mat-form-field-appearance-outline .mat-form-field-wrapper{padding-bottom:.25em}.mat-form-field-label{transition:none!important}.mat-form-field-should-float .mat-form-field-label-wrapper{top:-.1em;padding-top:.1em}.mat-form-field-should-float .mat-form-field-label{transition:none!important}.form-field{align-self:center;width:98%}.form-field:last-of-type{margin-top:1rem}\n"] }]
103
+ }], ctorParameters: function () { return [{ type: i1$1.UntypedFormBuilder }, { type: EmailApiService }]; }, propDecorators: { buttonStyle: [{
104
+ type: Input
105
+ }], formStyle: [{
106
+ type: Input
107
+ }], inputStyle: [{
108
+ type: Input
109
+ }], textStyle: [{
110
+ type: Input
111
+ }], nameLabel: [{
112
+ type: Input
113
+ }], emailAddressLabel: [{
114
+ type: Input
115
+ }], messageLabel: [{
116
+ type: Input
117
+ }], sendText: [{
118
+ type: Input
119
+ }], sendSuccessfulText: [{
120
+ type: Input
121
+ }], sendErrorText: [{
122
+ type: Input
123
+ }], apiURL: [{
78
124
  type: Input
79
125
  }], email: [{
80
126
  type: Input
@@ -82,16 +128,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImpor
82
128
 
83
129
  class ContactFormModule {
84
130
  }
85
- ContactFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
86
- ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, declarations: [ContactFormComponent], imports: [CommonModule, HttpClientModule, ReactiveFormsModule], exports: [ContactFormComponent] });
87
- ContactFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, providers: [EmailApiService], imports: [[CommonModule, HttpClientModule, ReactiveFormsModule]] });
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.0", ngImport: i0, type: ContactFormModule, decorators: [{
131
+ ContactFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
132
+ ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, declarations: [ContactFormComponent], imports: [CommonModule,
133
+ HttpClientModule,
134
+ BrowserAnimationsModule,
135
+ ReactiveFormsModule,
136
+ MatFormFieldModule,
137
+ MatInputModule], exports: [ContactFormComponent] });
138
+ ContactFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, providers: [EmailApiService], imports: [CommonModule,
139
+ HttpClientModule,
140
+ BrowserAnimationsModule,
141
+ ReactiveFormsModule,
142
+ MatFormFieldModule,
143
+ MatInputModule] });
144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ContactFormModule, decorators: [{
89
145
  type: NgModule,
90
146
  args: [{
91
- imports: [CommonModule, HttpClientModule, ReactiveFormsModule],
147
+ imports: [
148
+ CommonModule,
149
+ HttpClientModule,
150
+ BrowserAnimationsModule,
151
+ ReactiveFormsModule,
152
+ MatFormFieldModule,
153
+ MatInputModule
154
+ ],
92
155
  declarations: [ContactFormComponent],
93
156
  exports: [ContactFormComponent],
94
- providers: [EmailApiService],
157
+ providers: [EmailApiService]
95
158
  }]
96
159
  }] });
97
160
 
@@ -1 +1 @@
1
- {"version":3,"file":"tehw0lf-contact-form.mjs","sources":["../../../../libs/contact-form/src/lib/email-api.service.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.html","../../../../libs/contact-form/src/lib/contact-form.module.ts","../../../../libs/contact-form/src/tehw0lf-contact-form.ts"],"sourcesContent":["import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EmailApiService {\n httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n constructor(private http: HttpClient) {}\n\n sendEmail(apiURL: string, data: any): Observable<any> {\n return this.http.post(apiURL, JSON.stringify(data), this.httpOptions).pipe(\n map((response: any) => {\n return response;\n }),\n catchError((error: any) => {\n return of(error.statusText);\n })\n );\n }\n}\n","import { Component, Input, OnDestroy } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { takeUntil, tap } from 'rxjs/operators';\n\nimport { EmailApiService } from '../email-api.service';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'contact-form',\n templateUrl: './contact-form.component.html',\n styleUrls: ['./contact-form.component.scss']\n})\nexport class ContactFormComponent implements OnDestroy {\n @Input() apiURL = 'https://forwardmethis.com/';\n @Input() email = '';\n\n formGroup: FormGroup;\n emailSent: Subject<boolean | null> = new Subject();\n emailSent$ = this.emailSent.asObservable();\n\n private unsubscribe$: Subject<void> = new Subject();\n\n constructor(\n private builder: FormBuilder,\n private emailService: EmailApiService\n ) {\n this.emailSent.next(null);\n this.formGroup = this.builder.group({\n name: new FormControl('', [Validators.required]),\n email: new FormControl('', [Validators.required, Validators.email]),\n message: new FormControl('', [Validators.required])\n });\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n submitFormData(formData: FormGroup) {\n this.emailService\n .sendEmail(`${this.apiURL}${this.email}`, formData.value)\n .pipe(\n tap((response: string) => {\n if (response === 'OK') {\n this.emailSent.next(true);\n } else {\n this.emailSent.next(false);\n }\n }),\n takeUntil(this.unsubscribe$)\n )\n .subscribe();\n }\n}\n","<form\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n>\n <div class=\"form-group\">\n <label for=\"name\">Ihr Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n placeholder=\"Name\"\n formControlName=\"name\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"email\">Ihre E-Mail Adresse</label>\n <input\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n placeholder=\"ihre@mail.de\"\n formControlName=\"email\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"message\">Ihre Nachricht</label>\n <textarea class=\"form-control\" formControlName=\"message\" name=\"message\">\n </textarea>\n </div>\n <button class=\"form-button\" type=\"submit\" [disabled]=\"!formGroup.valid\">\n Senden\n </button>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === true\">\n E-Mail erfolgreich versendet!\n </div>\n <div class=\"form-status\" *ngIf=\"(emailSent$ | async) === false\">\n Fehler: E-Mail konnte nicht versendet werden\n </div>\n</form>\n","import { CommonModule } from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { ContactFormComponent } from './contact-form/contact-form.component';\nimport { EmailApiService } from './email-api.service';\n\n@NgModule({\n imports: [CommonModule, HttpClientModule, ReactiveFormsModule],\n declarations: [ContactFormComponent],\n exports: [ContactFormComponent],\n providers: [EmailApiService],\n})\nexport class ContactFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAQa,eAAe;IAM1B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QALpC,gBAAW,GAAG;YACZ,OAAO,EAAE,IAAI,WAAW,CAAC;gBACvB,cAAc,EAAE,kBAAkB;aACnC,CAAC;SACH,CAAC;KACsC;IAExC,SAAS,CAAC,MAAc,EAAE,IAAS;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CACxE,GAAG,CAAC,CAAC,QAAa;YAChB,OAAO,QAAQ,CAAC;SACjB,CAAC,EACF,UAAU,CAAC,CAAC,KAAU;YACpB,OAAO,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAA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IAAI,EAAE;gBACrB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC3B;iBAAM;gBACL,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC5B;SACF,CAAC,EACF,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAC7B;aACA,SAAS,EAAE,CAAC;KAChB;;iHAzCU,oBAAoB;qGAApB,oBAAoB,kGCbjC,soCAwCA;2FD3Ba,oBAAoB;kBANhC,SAAS;+BAEE,cAAc;+HAKf,MAAM;sBAAd,KAAK;gBACG,KAAK;sBAAb,KAAK;;;MEDK,iBAAiB;;8GAAjB,iBAAiB;+GAAjB,iBAAiB,iBAJb,oBAAoB,aADzB,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,aAEnD,oBAAoB;+GAGnB,iBAAiB,aAFjB,CAAC,eAAe,CAAC,YAHnB,CAAC,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;2FAKnD,iBAAiB;kBAN7B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;oBAC9D,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,SAAS,EAAE,CAAC,eAAe,CAAC;iBAC7B;;;ACbD;;;;;;"}
1
+ {"version":3,"file":"tehw0lf-contact-form.mjs","sources":["../../../../libs/contact-form/src/lib/email-api.service.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.ts","../../../../libs/contact-form/src/lib/contact-form/contact-form.component.html","../../../../libs/contact-form/src/lib/contact-form.module.ts","../../../../libs/contact-form/src/tehw0lf-contact-form.ts"],"sourcesContent":["import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EmailApiService {\n httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n constructor(private http: HttpClient) {}\n\n sendEmail(apiURL: string, data: any): Observable<any> {\n return this.http.post(apiURL, JSON.stringify(data), this.httpOptions).pipe(\n map((response: any) => {\n return response;\n }),\n catchError((error: any) => {\n return of(error.statusText);\n })\n );\n }\n}\n","import { Component, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { takeUntil, tap } from 'rxjs/operators';\n\nimport { EmailApiService } from '../email-api.service';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'contact-form',\n templateUrl: './contact-form.component.html',\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./contact-form.component.scss']\n})\nexport class ContactFormComponent implements OnDestroy {\n @Input() buttonStyle = {\n 'background-color': '#333333',\n border: 'none',\n color: '#cc7832'\n };\n\n @Input() formStyle = {\n color: '#437da8',\n 'background-color': 'rgba(34, 34, 34, 0.75)',\n 'backdrop-filter': 'blur(50px)',\n 'box-shadow': '0 2px 10px rgba(0, 0, 0, 0.075)'\n };\n\n @Input() inputStyle = {\n color: '#282b2e'\n };\n\n @Input() textStyle = { color: '#cc7832' };\n\n @Input() nameLabel = 'Your Name';\n\n @Input() emailAddressLabel = 'Your E-Mail Address';\n\n @Input() messageLabel = 'Your Message';\n\n @Input() sendText = 'Send';\n\n @Input() sendSuccessfulText = 'E-Mail successfully sent';\n\n @Input() sendErrorText = 'Send error';\n\n @Input() apiURL = 'https://forwardmethis.com/';\n @Input() email = '';\n\n formGroup: UntypedFormGroup;\n emailSent: Subject<boolean | null> = new Subject();\n emailSent$ = this.emailSent.asObservable();\n\n private unsubscribe$: Subject<void> = new Subject();\n\n constructor(\n private builder: UntypedFormBuilder,\n private emailService: EmailApiService\n ) {\n this.emailSent.next(null);\n this.formGroup = this.builder.group({\n name: new UntypedFormControl('', [Validators.required]),\n email: new UntypedFormControl('', [Validators.required, Validators.email]),\n message: new UntypedFormControl('', [Validators.required])\n });\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n submitFormData(formData: UntypedFormGroup) {\n this.emailService\n .sendEmail(`${this.apiURL}${this.email}`, formData.value)\n .pipe(\n tap((response: string) => {\n if (response === 'OK') {\n this.emailSent.next(true);\n } else {\n this.emailSent.next(false);\n }\n }),\n takeUntil(this.unsubscribe$)\n )\n .subscribe();\n }\n}\n","<form\n [ngStyle]=\"formStyle\"\n class=\"contact-form\"\n [formGroup]=\"formGroup\"\n (ngSubmit)=\"submitFormData(formGroup)\"\n fxLayout=\"column\"\n fxFlex\n>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"name\">{{ nameLabel }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"text\"\n name=\"name\"\n formControlName=\"name\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"email\">{{\n emailAddressLabel\n }}</mat-label>\n <input\n [ngStyle]=\"textStyle\"\n matInput\n class=\"form-control\"\n type=\"email\"\n name=\"email\"\n formControlName=\"email\"\n />\n </mat-form-field>\n <mat-form-field class=\"form-field\" appearance=\"outline\" fxFlex>\n <mat-label [ngStyle]=\"textStyle\" for=\"message\">\n {{ messageLabel }}\n </mat-label>\n <textarea\n [ngStyle]=\"inputStyle\"\n matInput\n formControlName=\"message\"\n name=\"message\"\n >\n </textarea>\n </mat-form-field>\n <button\n [ngStyle]=\"buttonStyle\"\n class=\"form-button\"\n type=\"submit\"\n [disabled]=\"!formGroup.valid\"\n >\n {{ sendText }}\n </button>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === true\"\n >\n {{ sendSuccessfulText }}\n </div>\n <div\n [ngStyle]=\"textStyle\"\n class=\"form-status\"\n *ngIf=\"(emailSent$ | async) === false\"\n >\n {{ sendErrorText }}\n </div>\n</form>\n","import { CommonModule } from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\nimport { ContactFormComponent } from './contact-form/contact-form.component';\nimport { EmailApiService } from './email-api.service';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n BrowserAnimationsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatInputModule\n ],\n declarations: [ContactFormComponent],\n exports: [ContactFormComponent],\n providers: [EmailApiService]\n})\nexport class ContactFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.EmailApiService"],"mappings":";;;;;;;;;;;;;;;;MAQa,eAAe,CAAA;AAM1B,IAAA,WAAA,CAAoB,IAAgB,EAAA;QAAhB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AALpC,QAAA,IAAA,CAAA,WAAW,GAAG;YACZ,OAAO,EAAE,IAAI,WAAW,CAAC;AACvB,gBAAA,cAAc,EAAE,kBAAkB;aACnC,CAAC;SACH,CAAC;KACsC;IAExC,SAAS,CAAC,MAAc,EAAE,IAAS,EAAA;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CACxE,GAAG,CAAC,CAAC,QAAa,KAAI;AACpB,YAAA,OAAO,QAAQ,CAAC;AAClB,SAAC,CAAC,EACF,UAAU,CAAC,CAAC,KAAU,KAAI;AACxB,YAAA,OAAO,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;S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AA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAFjB,SAAA,EAAA,CAAC,eAAe,CAAC,YAT1B,YAAY;QACZ,gBAAgB;QAChB,uBAAuB;QACvB,mBAAmB;QACnB,kBAAkB;QAClB,cAAc,CAAA,EAAA,CAAA,CAAA;2FAML,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,gBAAgB;wBAChB,uBAAuB;wBACvB,mBAAmB;wBACnB,kBAAkB;wBAClB,cAAc;AACf,qBAAA;oBACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,SAAS,EAAE,CAAC,eAAe,CAAC;AAC7B,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
@@ -1,20 +1,43 @@
1
1
  import { OnDestroy } from '@angular/core';
2
- import { FormBuilder, FormGroup } from '@angular/forms';
2
+ import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
3
3
  import { Subject } from 'rxjs';
4
4
  import { EmailApiService } from '../email-api.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class ContactFormComponent implements OnDestroy {
7
7
  private builder;
8
8
  private emailService;
9
+ buttonStyle: {
10
+ 'background-color': string;
11
+ border: string;
12
+ color: string;
13
+ };
14
+ formStyle: {
15
+ color: string;
16
+ 'background-color': string;
17
+ 'backdrop-filter': string;
18
+ 'box-shadow': string;
19
+ };
20
+ inputStyle: {
21
+ color: string;
22
+ };
23
+ textStyle: {
24
+ color: string;
25
+ };
26
+ nameLabel: string;
27
+ emailAddressLabel: string;
28
+ messageLabel: string;
29
+ sendText: string;
30
+ sendSuccessfulText: string;
31
+ sendErrorText: string;
9
32
  apiURL: string;
10
33
  email: string;
11
- formGroup: FormGroup;
34
+ formGroup: UntypedFormGroup;
12
35
  emailSent: Subject<boolean | null>;
13
36
  emailSent$: import("rxjs").Observable<boolean | null>;
14
37
  private unsubscribe$;
15
- constructor(builder: FormBuilder, emailService: EmailApiService);
38
+ constructor(builder: UntypedFormBuilder, emailService: EmailApiService);
16
39
  ngOnDestroy(): void;
17
- submitFormData(formData: FormGroup): void;
40
+ submitFormData(formData: UntypedFormGroup): void;
18
41
  static ɵfac: i0.ɵɵFactoryDeclaration<ContactFormComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ContactFormComponent, "contact-form", never, { "apiURL": "apiURL"; "email": "email"; }, {}, never, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContactFormComponent, "contact-form", never, { "buttonStyle": "buttonStyle"; "formStyle": "formStyle"; "inputStyle": "inputStyle"; "textStyle": "textStyle"; "nameLabel": "nameLabel"; "emailAddressLabel": "emailAddressLabel"; "messageLabel": "messageLabel"; "sendText": "sendText"; "sendSuccessfulText": "sendSuccessfulText"; "sendErrorText": "sendErrorText"; "apiURL": "apiURL"; "email": "email"; }, {}, never, never, false>;
20
43
  }
@@ -2,9 +2,12 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./contact-form/contact-form.component";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "@angular/common/http";
5
- import * as i4 from "@angular/forms";
5
+ import * as i4 from "@angular/platform-browser/animations";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "@angular/material/form-field";
8
+ import * as i7 from "@angular/material/input";
6
9
  export declare class ContactFormModule {
7
10
  static ɵfac: i0.ɵɵFactoryDeclaration<ContactFormModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<ContactFormModule, [typeof i1.ContactFormComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule, typeof i4.ReactiveFormsModule], [typeof i1.ContactFormComponent]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ContactFormModule, [typeof i1.ContactFormComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule, typeof i4.BrowserAnimationsModule, typeof i5.ReactiveFormsModule, typeof i6.MatFormFieldModule, typeof i7.MatInputModule], [typeof i1.ContactFormComponent]>;
9
12
  static ɵinj: i0.ɵɵInjectorDeclaration<ContactFormModule>;
10
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tehw0lf/contact-form",
3
- "version": "0.0.12",
3
+ "version": "0.14.3",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/tehw0lf/tehwol.fi.git",
6
6
  "repository": {
@@ -8,15 +8,16 @@
8
8
  "url": "https://github.com/tehw0lf/tehwol.fi.git"
9
9
  },
10
10
  "peerDependencies": {
11
- "@angular/animations": "^13.1.0",
12
- "@angular/cdk": "^13.1.0",
13
- "@angular/common": "^13.1.0",
14
- "@angular/core": "^13.1.0",
15
- "@angular/flex-layout": "^13.0.0-beta.36",
16
- "@angular/forms": "^13.1.0",
17
- "@angular/material": "^13.1.0",
18
- "rxjs": "~7.4.0",
19
- "@angular/platform-browser-dynamic": "13.1.0"
11
+ "@angular/animations": "^14.1.3",
12
+ "@angular/cdk": "^14.1.3",
13
+ "@angular/common": "^14.1.3",
14
+ "@angular/core": "^14.1.3",
15
+ "@angular/flex-layout": "^14.0.0-beta.40",
16
+ "@angular/forms": "^14.1.3",
17
+ "@angular/material": "^14.1.3",
18
+ "@angular/platform-browser": "14.1.3",
19
+ "rxjs": "7.5.6",
20
+ "@angular/platform-browser-dynamic": "14.1.3"
20
21
  },
21
22
  "dependencies": {
22
23
  "tslib": "^2.2.0"
@@ -27,13 +28,13 @@
27
28
  "esm2020": "esm2020/tehw0lf-contact-form.mjs",
28
29
  "fesm2020": "fesm2020/tehw0lf-contact-form.mjs",
29
30
  "fesm2015": "fesm2015/tehw0lf-contact-form.mjs",
30
- "typings": "tehw0lf-contact-form.d.ts",
31
+ "typings": "index.d.ts",
31
32
  "exports": {
32
33
  "./package.json": {
33
34
  "default": "./package.json"
34
35
  },
35
36
  ".": {
36
- "types": "./tehw0lf-contact-form.d.ts",
37
+ "types": "./index.d.ts",
37
38
  "esm2020": "./esm2020/tehw0lf-contact-form.mjs",
38
39
  "es2020": "./fesm2020/tehw0lf-contact-form.mjs",
39
40
  "es2015": "./fesm2015/tehw0lf-contact-form.mjs",
@@ -42,4 +43,4 @@
42
43
  }
43
44
  },
44
45
  "sideEffects": false
45
- }
46
+ }
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const tasks_1 = require("@angular-devkit/schematics/tasks");
13
+ const schematics_1 = require("@angular/cdk/schematics");
13
14
  const dependencies_1 = require("@schematics/angular/utility/dependencies");
14
15
  const workspace_1 = require("@schematics/angular/utility/workspace");
15
16
  const workspace_models_1 = require("@schematics/angular/utility/workspace-models");
@@ -18,10 +19,7 @@ function default_1(options) {
18
19
  return (host, context) => __awaiter(this, void 0, void 0, function* () {
19
20
  const materialVersion = (0, package_config_1.getPackageVersionFromPackageJson)(host, '@angular/material');
20
21
  const workspace = yield (0, workspace_1.getWorkspace)(host);
21
- const defaultProject = workspace.extensions.defaultProject;
22
- const project = options.project
23
- ? workspace.projects.get(options.project)
24
- : workspace.projects.get(defaultProject);
22
+ const project = (0, schematics_1.getProjectFromWorkspace)(workspace, options.project);
25
23
  if (!project) {
26
24
  (0, dependencies_1.removePackageJsonDependency)(host, '@tehw0lf/contact-form');
27
25
  context.logger.error(`No project specified and can not find default project ${project}`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/contact-form/schematics/ng-add/index.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,4DAA4F;AAC5F,2EAAuF;AACvF,qEAAqE;AACrE,mFAA2E;AAE3E,qDAAoE;AAGpE,mBAAyB,OAAe;IACtC,OAAO,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;QACrD,MAAM,eAAe,GAAG,IAAA,iDAA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,EAAE,CAAC,CAAC;YAC9C,OAAO;SACR;QAED,OAAO,CAAC,OAAO,CAAC,IAAI,wBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC;IACjE,CAAC,CAAA,CAAC;AACJ,CAAC;AAtCD,4BAsCC"}
@@ -13,6 +13,7 @@ const testing_1 = require("@angular-devkit/schematics/testing");
13
13
  const file_content_1 = require("../testing/file-content");
14
14
  const test_app_1 = require("../testing/test-app");
15
15
  const test_library_1 = require("../testing/test-library");
16
+ const testProjectName = 'test-project';
16
17
  describe('ng-add-setup schematic with material present', () => {
17
18
  let runner;
18
19
  let appTree;
@@ -32,15 +33,13 @@ describe('ng-add-setup schematic with material present', () => {
32
33
  }
33
34
  });
34
35
  }));
35
- describe('add module', () => {
36
- it('should add the ContactFormModule to the project module', () => __awaiter(void 0, void 0, void 0, function* () {
37
- const tree = yield runner
38
- .runSchematicAsync('ng-add-setup', {}, appTree)
39
- .toPromise();
40
- const fileContent = (0, file_content_1.getFileContent)(tree, '/projects/material/src/app/app.module.ts');
41
- expect(fileContent).toContain('ContactFormModule');
42
- }));
43
- });
36
+ it('should add the ContactFormModule to the project module', () => __awaiter(void 0, void 0, void 0, function* () {
37
+ const tree = yield runner
38
+ .runSchematicAsync('ng-add-setup', { project: testProjectName }, appTree)
39
+ .toPromise();
40
+ const fileContent = (0, file_content_1.getFileContent)(tree, `/projects/${testProjectName}/src/app/app.module.ts`);
41
+ expect(fileContent).toContain('ContactFormModule');
42
+ }));
44
43
  });
45
44
  describe('ng-add schematic without material present', () => {
46
45
  let runner;
@@ -61,19 +60,17 @@ describe('ng-add schematic without material present', () => {
61
60
  }
62
61
  });
63
62
  }));
64
- describe('fail to add module', () => {
65
- it('should fail if material is missing', () => __awaiter(void 0, void 0, void 0, function* () {
66
- const tree = yield runner
67
- .runSchematicAsync('ng-add', {}, appTree)
68
- .toPromise();
69
- const fileContent = (0, file_content_1.getFileContent)(tree, '/projects/material/src/app/app.module.ts');
70
- expect(fileContent).not.toContain('ContactFormModule');
71
- expect(errorOutput.length).toBe(1);
72
- expect(warnOutput.length).toBe(0);
73
- expect(errorOutput[0]).toMatch(`@angular/material not found.
63
+ it('should fail to add module if material is missing', () => __awaiter(void 0, void 0, void 0, function* () {
64
+ const tree = yield runner
65
+ .runSchematicAsync('ng-add', { project: testProjectName }, appTree)
66
+ .toPromise();
67
+ const fileContent = (0, file_content_1.getFileContent)(tree, `/projects/${testProjectName}/src/app/app.module.ts`);
68
+ expect(fileContent).not.toContain('ContactFormModule');
69
+ expect(errorOutput.length).toBe(1);
70
+ expect(warnOutput.length).toBe(0);
71
+ expect(errorOutput[0]).toMatch(`@angular/material not found.
74
72
  Please run 'ng add @angular/material' first`);
75
- }));
76
- });
73
+ }));
77
74
  });
78
75
  describe('ng-add schematic - library project', () => {
79
76
  let runner;
@@ -95,7 +92,9 @@ describe('ng-add schematic - library project', () => {
95
92
  });
96
93
  }));
97
94
  it('should do nothing if a library project is targeted', () => __awaiter(void 0, void 0, void 0, function* () {
98
- yield runner.runSchematicAsync('ng-add', {}, libraryTree).toPromise();
95
+ yield runner
96
+ .runSchematicAsync('ng-add', { project: testProjectName }, libraryTree)
97
+ .toPromise();
99
98
  expect(errorOutput.length).toBe(1);
100
99
  expect(errorOutput[0]).toMatch('This library needs to be added to an application project');
101
100
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../../libs/contact-form/schematics/ng-add/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,gEAAyE;AAEzE,0DAAyD;AACzD,kDAA+E;AAC/E,0DAA4D;AAE5D,QAAQ,CAAC,8CAA8C,EAAE,GAAG,EAAE;IAC5D,IAAI,MAA2B,CAAC;IAChC,IAAI,OAAa,CAAC;IAClB,IAAI,WAAqB,CAAC;IAC1B,IAAI,UAAoB,CAAC;IAEzB,UAAU,CAAC,GAAS,EAAE;QACpB,MAAM,GAAG,IAAI,6BAAmB,CAC9B,YAAY,EACZ,OAA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A,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -16,7 +16,7 @@ const workspace_1 = require("@schematics/angular/utility/workspace");
16
16
  const package_config_1 = require("./package-config");
17
17
  const contactFormModuleName = 'ContactFormModule';
18
18
  const contactFormPackageName = '@tehw0lf/contact-form';
19
- const flexLayoutFallbackVersion = '^13.0.0-beta.36';
19
+ const flexLayoutFallbackVersion = '^14.0.0-beta.40';
20
20
  function default_1(options) {
21
21
  return () => __awaiter(this, void 0, void 0, function* () {
22
22
  return (0, schematics_1.chain)([addDependencies(), addContactFormModule(options)]);
@@ -17,11 +17,11 @@ function createTestProject(runner, projectType, appOptions = {}, tree) {
17
17
  .runExternalSchematicAsync('@schematics/angular', 'workspace', {
18
18
  name: 'workspace',
19
19
  version: '6.0.0',
20
- newProjectRoot: 'projects',
20
+ newProjectRoot: 'projects'
21
21
  }, tree)
22
22
  .toPromise();
23
23
  return runner
24
- .runExternalSchematicAsync('@schematics/angular', projectType, Object.assign({ name: 'material' }, appOptions), workspaceTree)
24
+ .runExternalSchematicAsync('@schematics/angular', projectType, Object.assign({ name: 'test-project' }, appOptions), workspaceTree)
25
25
  .toPromise();
26
26
  });
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"test-project.js","sourceRoot":"","sources":["../../../../../libs/contact-form/schematics/testing/test-project.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,8CAA8C;AAC9C,SAAsB,iBAAiB,CACrC,MAA2B,EAC3B,WAAsC,EACtC,UAAU,GAAG,EAAE,EACf,IAAW;;QAEX,MAAM,aAAa,GAAG,MAAM,MAAM;aAC/B,yBAAyB,CACxB,qBAAqB,EACrB,WAAW,EACX;YACE,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,OAAO;YAChB,cAAc,EAAE,UAAU;SAC3B,EACD,IAAI,CACL;aACA,SAAS,EAAE,CAAC;QAEf,OAAO,MAAM;aACV,yBAAyB,CACxB,qBAAqB,EACrB,WAAW,kBACV,IAAI,EAAE,UAAU,IAAK,UAAU,GAChC,aAAa,CACd;aACA,SAAS,EAAE,CAAC;IACjB,CAAC;CAAA;AA3BD,8CA2BC"}
1
+ {"version":3,"file":"test-project.js","sourceRoot":"","sources":["../../../../../libs/contact-form/schematics/testing/test-project.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,8CAA8C;AAC9C,SAAsB,iBAAiB,CACrC,MAA2B,EAC3B,WAAsC,EACtC,UAAU,GAAG,EAAE,EACf,IAAW;;QAEX,MAAM,aAAa,GAAG,MAAM,MAAM;aAC/B,yBAAyB,CACxB,qBAAqB,EACrB,WAAW,EACX;YACE,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,OAAO;YAChB,cAAc,EAAE,UAAU;SAC3B,EACD,IAAI,CACL;aACA,SAAS,EAAE,CAAC;QAEf,OAAO,MAAM;aACV,yBAAyB,CACxB,qBAAqB,EACrB,WAAW,kBACT,IAAI,EAAE,cAAc,IAAK,UAAU,GACrC,aAAa,CACd;aACA,SAAS,EAAE,CAAC;IACjB,CAAC;CAAA;AA3BD,8CA2BC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@tehw0lf/contact-form" />
5
- export * from './index';