UNPKG

@ngx-formly/bootstrap

Version:

Formly is a dynamic (JSON powered) form library for Angular that bring unmatched maintainability to your application's forms.

99 lines (93 loc) 4.81 kB
import * as i0 from '@angular/core'; import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core'; import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field'; import * as i1 from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms'; import * as i2 from '@ngx-formly/core'; import { FormlyModule } from '@ngx-formly/core'; import { CommonModule } from '@angular/common'; class FormlyFieldTextArea extends FieldType { constructor() { super(...arguments); this.defaultOptions = { props: { cols: 1, rows: 1, }, }; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyFieldTextArea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: ` <ng-template #fieldTypeTemplate> <textarea [formControl]="formControl" [cols]="props.cols" [rows]="props.rows" class="form-control" [class.is-invalid]="showError" [formlyAttributes]="field" [attr.aria-describedby]="id + '-formly-validation-error'" [attr.aria-invalid]="showError" ></textarea> </ng-template> `, isInline: true, dependencies: [{ 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldTextArea, decorators: [{ type: Component, args: [{ selector: 'formly-field-textarea', template: ` <ng-template #fieldTypeTemplate> <textarea [formControl]="formControl" [cols]="props.cols" [rows]="props.rows" class="form-control" [class.is-invalid]="showError" [formlyAttributes]="field" [attr.aria-describedby]="id + '-formly-validation-error'" [attr.aria-invalid]="showError" ></textarea> </ng-template> `, changeDetection: ChangeDetectionStrategy.OnPush, }] }] }); function withFormlyFieldTextArea() { return { types: [ { name: 'textarea', component: FormlyFieldTextArea, wrappers: ['form-field'], }, ], }; } class FormlyBootstrapTextAreaModule { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyBootstrapTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); } static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: FormlyBootstrapTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule, ReactiveFormsModule, FormlyBootstrapFormFieldModule, i2.FormlyModule] }); } static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyBootstrapTextAreaModule, imports: [CommonModule, ReactiveFormsModule, FormlyBootstrapFormFieldModule, FormlyModule.forChild(withFormlyFieldTextArea())] }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyBootstrapTextAreaModule, decorators: [{ type: NgModule, args: [{ declarations: [FormlyFieldTextArea], imports: [ CommonModule, ReactiveFormsModule, FormlyBootstrapFormFieldModule, FormlyModule.forChild(withFormlyFieldTextArea()), ], }] }] }); /** * Generated bundle index. Do not edit. */ export { FormlyBootstrapTextAreaModule, FormlyFieldTextArea, withFormlyFieldTextArea }; //# sourceMappingURL=ngx-formly-bootstrap-textarea.mjs.map