@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 +41 -10
- package/esm2020/lib/contact-form/contact-form.component.mjs +54 -11
- package/esm2020/lib/contact-form.module.mjs +27 -7
- package/esm2020/lib/email-api.service.mjs +3 -3
- package/fesm2015/tehw0lf-contact-form.mjs +82 -19
- package/fesm2015/tehw0lf-contact-form.mjs.map +1 -1
- package/fesm2020/tehw0lf-contact-form.mjs +82 -19
- package/fesm2020/tehw0lf-contact-form.mjs.map +1 -1
- package/lib/contact-form/contact-form.component.d.ts +28 -5
- package/lib/contact-form.module.d.ts +5 -2
- package/package.json +14 -13
- package/schematics/ng-add/index.js +2 -4
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/index.spec.js +21 -22
- package/schematics/ng-add/index.spec.js.map +1 -1
- package/schematics/ng-add/setup.js +1 -1
- package/schematics/testing/test-project.js +2 -2
- package/schematics/testing/test-project.js.map +1 -1
- package/tehw0lf-contact-form.d.ts +0 -5
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
|
|
44
|
-
yourEmailAddress
|
|
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
|
|
61
|
+
The styles of form background, button, input and text can be customized with optional input parameters:
|
|
62
62
|
|
|
63
63
|
```ts
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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 {
|
|
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
|
|
22
|
-
email: new
|
|
23
|
-
message: new
|
|
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: "
|
|
45
|
-
ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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 <
|
|
49
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
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,
|
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFjdC1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29udGFjdC1mb3JtL3NyYy9saWIvY29udGFjdC1mb3JtL2NvbnRhY3QtZm9ybS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbnRhY3QtZm9ybS9zcmMvbGliL2NvbnRhY3QtZm9ybS9jb250YWN0LWZvcm0uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6I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1cInRleHRTdHlsZVwiXG4gICAgY2xhc3M9XCJmb3JtLXN0YXR1c1wiXG4gICAgKm5nSWY9XCIoZW1haWxTZW50JCB8IGFzeW5jKSA9PT0gZmFsc2VcIlxuICA+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: "
|
|
11
|
-
ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
12
|
-
|
|
13
|
-
|
|
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: [
|
|
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,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFjdC1mb3JtLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29udGFjdC1mb3JtL3NyYy9saWIvY29udGFjdC1mb3JtLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDeEQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEV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pZGVyczogW0VtYWlsQXBpU2VydmljZV1cbn0pXG5leHBvcnQgY2xhc3MgQ29udGFjdEZvcm1Nb2R1bGUge31cbiJdfQ==
|
|
@@ -21,9 +21,9 @@ export class EmailApiService {
|
|
|
21
21
|
}));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
EmailApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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 {
|
|
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: "
|
|
30
|
-
EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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
|
|
50
|
-
email: new
|
|
51
|
-
message: new
|
|
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: "
|
|
73
|
-
ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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 <
|
|
77
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
|
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: "
|
|
86
|
-
ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
87
|
-
|
|
88
|
-
|
|
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: [
|
|
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,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AAb,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;AAAhB,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QALpC,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;SAC7B,CAAC,CACH,CAAC;KACH;;4GAjBU,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;2FAEP,e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AgB;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;iBAC7B,CAAA;;;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 {
|
|
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: "
|
|
30
|
-
EmailApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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
|
|
50
|
-
email: new
|
|
51
|
-
message: new
|
|
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: "
|
|
73
|
-
ContactFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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 <
|
|
77
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
|
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: "
|
|
86
|
-
ContactFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
87
|
-
|
|
88
|
-
|
|
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: [
|
|
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,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../../../../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,CA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A,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CAJb,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAPjC,YAAY;QACZ,gBAAgB;QAChB,uBAAuB;QACvB,mBAAmB;QACnB,kBAAkB;AAClB,QAAA,cAAc,aAGN,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAGnB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,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 {
|
|
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:
|
|
34
|
+
formGroup: UntypedFormGroup;
|
|
12
35
|
emailSent: Subject<boolean | null>;
|
|
13
36
|
emailSent$: import("rxjs").Observable<boolean | null>;
|
|
14
37
|
private unsubscribe$;
|
|
15
|
-
constructor(builder:
|
|
38
|
+
constructor(builder: UntypedFormBuilder, emailService: EmailApiService);
|
|
16
39
|
ngOnDestroy(): void;
|
|
17
|
-
submitFormData(formData:
|
|
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/
|
|
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.
|
|
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": "^
|
|
12
|
-
"@angular/cdk": "^
|
|
13
|
-
"@angular/common": "^
|
|
14
|
-
"@angular/core": "^
|
|
15
|
-
"@angular/flex-layout": "^
|
|
16
|
-
"@angular/forms": "^
|
|
17
|
-
"@angular/material": "^
|
|
18
|
-
"
|
|
19
|
-
"
|
|
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": "
|
|
31
|
+
"typings": "index.d.ts",
|
|
31
32
|
"exports": {
|
|
32
33
|
"./package.json": {
|
|
33
34
|
"default": "./package.json"
|
|
34
35
|
},
|
|
35
36
|
".": {
|
|
36
|
-
"types": "./
|
|
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
|
|
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,iDAAgC,EACtD,IAAI,EACJ,mBAAmB,CACpB,CAAC;QACF,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/contact-form/schematics/ng-add/index.ts"],"names":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,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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
|
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,OAAO,CAAC,OAAO,CAAC,oBAAoB,CA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AAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;YAC5B,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO,EAAE;gBACvB,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;aAC7B;iBAAM,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,EAAE;gBAC7B,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;aAC5B;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAS,EAAE;QAClE,MAAM,MAAM;aACT,iBAAiB,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,WAAW,CAAC;aACtE,SAAS,EAAE,CAAC;QAEf,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAC5B,0DAA0D,CAC3D,CAAC;IACJ,CAAC,CAAA,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 = '^
|
|
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: '
|
|
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":";;;;;;;;;;;;
|
|
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"}
|