UNPKG

@ngx-formly/ionic

Version:

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

50 lines 5.64 kB
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { FieldType } from '@ngx-formly/core'; import * as i0 from "@angular/core"; import * as i1 from "@angular/common"; import * as i2 from "@angular/forms"; import * as i3 from "@ionic/angular"; import * as i4 from "@ngx-formly/ionic/form-field"; export 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"] }] }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91aS9pb25pYy9pbnB1dC9zcmMvaW5wdXQudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFRLE1BQU0sZUFBZSxDQUFDO0FBRXpFLE9BQU8sRUFBRSxTQUFTLEVBQXNDLE1BQU0sa0JBQWtCLENBQUM7Ozs7OztBQWdDakYsTUFBTSxPQUFPLGdCQUFpQixTQUFRLFNBQXNDOytHQUEvRCxnQkFBZ0I7bUdBQWhCLGdCQUFnQixxRkFyQmpCOzs7Ozs7Ozs7Ozs7Ozs7OztHQWlCVDs7NEZBSVUsZ0JBQWdCO2tCQXZCNUIsU0FBUzsrQkFDRSx3QkFBd0IsWUFDeE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