@netgrif/components
Version:
Netgrif Application Engine frontend Angular components
25 lines • 14.8 kB
JavaScript
import { Component } from '@angular/core';
import { AbstractEmailSubmissionFormComponent } from '@netgrif/components-core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/common";
import * as i3 from "@ngbracket/ngx-layout";
import * as i4 from "@angular/material/button";
import * as i5 from "@angular/material/icon";
import * as i6 from "@angular/material/input";
import * as i7 from "@angular/material/form-field";
import * as i8 from "@angular/material/progress-spinner";
import * as i9 from "../../legal/legal-notice/legal-notice.component";
import * as i10 from "@ngx-translate/core";
export class EmailSubmissionFormComponent extends AbstractEmailSubmissionFormComponent {
constructor(formBuilder) {
super(formBuilder);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EmailSubmissionFormComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EmailSubmissionFormComponent, selector: "nc-email-submission-form", usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutAlign=\"start center\" fxLayoutGap=\"24px\">\n <form [formGroup]=\"rootFormGroup\" (ngSubmit)=\"onSubmit()\" class=\"full-width netgrif-input\">\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon color=\"primary\" class=\"netgrif-icon-fix\">email</mat-icon>\n <mat-form-field fxFlex=\"100\" appearance=\"outline\">\n <mat-label>{{ 'forms.email.enterEmail' | translate}}</mat-label>\n <input matInput formControlName=\"email\" required\n autocomplete=\"email\">\n <mat-error *ngIf=\"rootFormGroup.controls['email'].hasError('email')\">\n {{ 'dataField.validations.email' | translate}}\n </mat-error>\n </mat-form-field>\n </div>\n <nc-legal-notice *ngIf=\"displayLegalNotice\" [buttonName]=\"'dialog.submit'\"></nc-legal-notice>\n <div fxLayout=\"row\" class=\"margin-top-4\">\n <button mat-icon-button fxLayoutAlign=\"start\" (click)=\"emitGoBack()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n <div fxFlex></div>\n <button fxLayoutAlign=\"end\" mat-raised-button color=\"primary\" fxFlexOffset=\"8px\">\n <mat-spinner *ngIf=\"loading | async\"\n mode=\"indeterminate\"\n diameter=\"36\"\n color=\"accent\"\n fxFlex></mat-spinner>\n <span *ngIf=\"(loading | async) === false\" fxFlex>{{ 'dialog.submit' | translate}}</span>\n </button>\n </div>\n </form>\n</div>\n", styles: [".margin-top-4{margin-top:4px}.full-width{width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.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: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: i9.LegalNoticeComponent, selector: "nc-legal-notice" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.TranslatePipe, name: "translate" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EmailSubmissionFormComponent, decorators: [{
type: Component,
args: [{ selector: 'nc-email-submission-form', template: "<div fxLayout=\"column\" fxLayoutAlign=\"start center\" fxLayoutGap=\"24px\">\n <form [formGroup]=\"rootFormGroup\" (ngSubmit)=\"onSubmit()\" class=\"full-width netgrif-input\">\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\">\n <mat-icon color=\"primary\" class=\"netgrif-icon-fix\">email</mat-icon>\n <mat-form-field fxFlex=\"100\" appearance=\"outline\">\n <mat-label>{{ 'forms.email.enterEmail' | translate}}</mat-label>\n <input matInput formControlName=\"email\" required\n autocomplete=\"email\">\n <mat-error *ngIf=\"rootFormGroup.controls['email'].hasError('email')\">\n {{ 'dataField.validations.email' | translate}}\n </mat-error>\n </mat-form-field>\n </div>\n <nc-legal-notice *ngIf=\"displayLegalNotice\" [buttonName]=\"'dialog.submit'\"></nc-legal-notice>\n <div fxLayout=\"row\" class=\"margin-top-4\">\n <button mat-icon-button fxLayoutAlign=\"start\" (click)=\"emitGoBack()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n <div fxFlex></div>\n <button fxLayoutAlign=\"end\" mat-raised-button color=\"primary\" fxFlexOffset=\"8px\">\n <mat-spinner *ngIf=\"loading | async\"\n mode=\"indeterminate\"\n diameter=\"36\"\n color=\"accent\"\n fxFlex></mat-spinner>\n <span *ngIf=\"(loading | async) === false\" fxFlex>{{ 'dialog.submit' | translate}}</span>\n </button>\n </div>\n </form>\n</div>\n", styles: [".margin-top-4{margin-top:4px}.full-width{width:100%}\n"] }]
}], ctorParameters: () => [{ type: i1.FormBuilder }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1haWwtc3VibWlzc2lvbi1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25ldGdyaWYtY29tcG9uZW50cy9zcmMvbGliL2Zvcm1zL2VtYWlsLXN1Ym1pc3Npb24vZW1haWwtc3VibWlzc2lvbi1mb3JtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25ldGdyaWYtY29tcG9uZW50cy9zcmMvbGliL2Zvcm1zL2VtYWlsLXN1Ym1pc3Npb24vZW1haWwtc3VibWlzc2lvbi1mb3JtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFeEMsT0FBTyxFQUFDLG9DQUFvQyxFQUFDLE1BQU0sMEJBQTBCLENBQUM7Ozs7Ozs7Ozs7OztBQU85RSxNQUFNLE9BQU8sNEJBQTZCLFNBQVEsb0NBQ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PlxuICAgICAgICA8ZGl2IGZ4TGF5b3V0PVwicm93XCIgY2xhc3M9XCJtYXJnaW4tdG9wLTRcIj5cbiAgICAgICAgICAgIDxidXR0b24gbWF0LWljb24tYnV0dG9uIGZ4TGF5b3V0QWxpZ249XCJzdGFydFwiIChjbGljayk9XCJlbWl0R29CYWNrKClcIj5cbiAgICAgICAgICAgICAgICA8bWF0LWljb24+YXJyb3dfYmFjazwvbWF0LWljb24+XG4gICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIDxkaXYgZnhGbGV4PjwvZGl2PlxuICAgICAgICAgICAgPGJ1dHRvbiBmeExheW91dEFsaWduPVwiZW5kXCIgbWF0LXJhaXNlZC1idXR0b24gY29sb3I9XCJwcmltYXJ5XCIgZnhGbGV4T2Zmc2V0PVwiOHB4XCI+XG4gICAgICAgICAgICAgICAgPG1hdC1zcGlubmVyICpuZ0lmPVwibG9hZGluZyB8IGFzeW5jXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZT1cImluZGV0ZXJtaW5hdGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaWFtZXRlcj1cIjM2XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9XCJhY2NlbnRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmeEZsZXg+PC9tYXQtc3Bpbm5lcj5cbiAgICAgICAgICAgICAgICA8c3BhbiAqbmdJZj1cIihsb2FkaW5nIHwgYXN5bmMpID09PSBmYWxzZVwiIGZ4RmxleD57eyAnZGlhbG9nLnN1Ym1pdCcgfCB0cmFuc2xhdGV9fTwvc3Bhbj5cbiAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICA8L2Rpdj5cbiAgICA8L2Zvcm0+XG48L2Rpdj5cbiJdfQ==