UNPKG

@ngx-formly/ionic

Version:

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

121 lines (115 loc) 6.09 kB
import * as i0 from '@angular/core'; import { ChangeDetectionStrategy, Component, NO_ERRORS_SCHEMA, NgModule } from '@angular/core'; import * as i1$1 from '@ngx-formly/core'; import { FieldType, FormlyModule } from '@ngx-formly/core'; import * as i1 from '@angular/common'; import { CommonModule } from '@angular/common'; import * as i2 from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms'; import * as i3 from '@ionic/angular'; import { IonicModule } from '@ionic/angular'; import * as i4 from '@ngx-formly/ionic/form-field'; import { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field'; class FormlyFieldInput extends FieldType { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyFieldInput, selector: "formly-field-ion-input", usesInheritance: true, ngImport: i0, template: ` <ion-input *ngIf="props.type !== 'number'; else numberTmp" [type]="props.type || 'text'" [label]="props.label" [labelPlacement]="props.labelPosition" [formControl]="formControl" [ionFormlyAttributes]="field" ></ion-input> <ng-template #numberTmp> <ion-input type="number" [label]="props.label" [formControl]="formControl" [ionFormlyAttributes]="field" ></ion-input> </ng-template> `, isInline: true, styles: [":host{display:inherit}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.IonInput, selector: "ion-input", inputs: ["autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearInputIcon", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "spellcheck", "step", "type", "value"] }, { kind: "directive", type: i3.NumericValueAccessor, selector: "ion-input[type=number],ion-range" }, { kind: "directive", type: i3.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "directive", type: i4.ɵIonFormlyAttributes, selector: "[ionFormlyAttributes]", inputs: ["ionFormlyAttributes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldInput, decorators: [{ type: Component, args: [{ selector: 'formly-field-ion-input', template: ` <ion-input *ngIf="props.type !== 'number'; else numberTmp" [type]="props.type || 'text'" [label]="props.label" [labelPlacement]="props.labelPosition" [formControl]="formControl" [ionFormlyAttributes]="field" ></ion-input> <ng-template #numberTmp> <ion-input type="number" [label]="props.label" [formControl]="formControl" [ionFormlyAttributes]="field" ></ion-input> </ng-template> `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inherit}\n"] }] }] }); function withFormlyFieldInput() { return { types: [ { name: 'input', component: FormlyFieldInput, wrappers: ['form-field'], }, { name: 'string', extends: 'input' }, { name: 'number', extends: 'input', defaultOptions: { props: { type: 'number', }, }, }, { name: 'integer', extends: 'input', defaultOptions: { props: { type: 'number', }, }, }, ], }; } class FormlyInputModule { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); } static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: FormlyInputModule, declarations: [FormlyFieldInput], imports: [CommonModule, ReactiveFormsModule, IonicModule, FormlyFormFieldModule, i1$1.FormlyModule] }); } static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyInputModule, imports: [CommonModule, ReactiveFormsModule, IonicModule, FormlyFormFieldModule, FormlyModule.forChild(withFormlyFieldInput())] }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyInputModule, decorators: [{ type: NgModule, args: [{ declarations: [FormlyFieldInput], imports: [ CommonModule, ReactiveFormsModule, IonicModule, FormlyFormFieldModule, FormlyModule.forChild(withFormlyFieldInput()), ], schemas: [NO_ERRORS_SCHEMA], }] }] }); /** * Generated bundle index. Do not edit. */ export { FormlyFieldInput, FormlyInputModule, withFormlyFieldInput }; //# sourceMappingURL=ngx-formly-ionic-input.mjs.map