@ngx-formly/ionic 5.12.3 → 6.0.0-beta.2
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 +9 -6
- package/checkbox/checkbox.module.d.ts +12 -0
- package/checkbox/checkbox.type.d.ts +14 -0
- package/checkbox/ngx-formly-ionic-checkbox.d.ts +5 -0
- package/checkbox/package.json +10 -0
- package/checkbox/public_api.d.ts +2 -0
- package/datetime/datetime.module.d.ts +12 -0
- package/datetime/datetime.type.d.ts +38 -0
- package/datetime/ngx-formly-ionic-datetime.d.ts +5 -0
- package/datetime/package.json +10 -0
- package/datetime/public_api.d.ts +2 -0
- package/esm2020/checkbox/checkbox.module.mjs +61 -0
- package/esm2020/checkbox/checkbox.type.mjs +19 -0
- package/esm2020/checkbox/ngx-formly-ionic-checkbox.mjs +5 -0
- package/esm2020/checkbox/public_api.mjs +3 -0
- package/esm2020/datetime/datetime.module.mjs +53 -0
- package/esm2020/datetime/datetime.type.mjs +129 -0
- package/esm2020/datetime/ngx-formly-ionic-datetime.mjs +5 -0
- package/esm2020/datetime/public_api.mjs +2 -0
- package/esm2020/form-field/form-field.module.mjs +49 -0
- package/esm2020/form-field/form-field.wrapper.mjs +52 -0
- package/esm2020/form-field/formly.attributes.mjs +23 -0
- package/esm2020/form-field/ngx-formly-ionic-form-field.mjs +5 -0
- package/esm2020/form-field/public_api.mjs +3 -0
- package/esm2020/input/input.module.mjs +91 -0
- package/esm2020/input/input.type.mjs +41 -0
- package/esm2020/input/ngx-formly-ionic-input.mjs +5 -0
- package/esm2020/input/public_api.mjs +3 -0
- package/esm2020/lib/ui-ionic.mjs +2 -0
- package/esm2020/lib/ui-ionic.module.mjs +52 -0
- package/esm2020/ngx-formly-ionic.mjs +5 -0
- package/esm2020/public_api.mjs +5 -0
- package/esm2020/radio/ngx-formly-ionic-radio.mjs +5 -0
- package/esm2020/radio/public_api.mjs +3 -0
- package/esm2020/radio/radio.module.mjs +57 -0
- package/esm2020/radio/radio.type.mjs +66 -0
- package/esm2020/select/ngx-formly-ionic-select.mjs +5 -0
- package/esm2020/select/public_api.mjs +3 -0
- package/esm2020/select/select.module.mjs +59 -0
- package/esm2020/select/select.type.mjs +70 -0
- package/esm2020/slider/ngx-formly-ionic-slider.mjs +5 -0
- package/esm2020/slider/public_api.mjs +2 -0
- package/esm2020/slider/slider.module.mjs +47 -0
- package/esm2020/slider/slider.type.mjs +30 -0
- package/esm2020/textarea/ngx-formly-ionic-textarea.mjs +5 -0
- package/esm2020/textarea/public_api.mjs +3 -0
- package/esm2020/textarea/textarea.module.mjs +53 -0
- package/esm2020/textarea/textarea.type.mjs +26 -0
- package/esm2020/toggle/ngx-formly-ionic-toggle.mjs +5 -0
- package/esm2020/toggle/public_api.mjs +2 -0
- package/esm2020/toggle/toggle.module.mjs +53 -0
- package/esm2020/toggle/toggle.type.mjs +19 -0
- package/fesm2015/ngx-formly-ionic-checkbox.mjs +83 -0
- package/fesm2015/ngx-formly-ionic-checkbox.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-datetime.mjs +186 -0
- package/fesm2015/ngx-formly-ionic-datetime.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-form-field.mjs +122 -0
- package/fesm2015/ngx-formly-ionic-form-field.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-input.mjs +135 -0
- package/fesm2015/ngx-formly-ionic-input.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-radio.mjs +125 -0
- package/fesm2015/ngx-formly-ionic-radio.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-select.mjs +132 -0
- package/fesm2015/ngx-formly-ionic-select.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-slider.mjs +80 -0
- package/fesm2015/ngx-formly-ionic-slider.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-textarea.mjs +82 -0
- package/fesm2015/ngx-formly-ionic-textarea.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic-toggle.mjs +75 -0
- package/fesm2015/ngx-formly-ionic-toggle.mjs.map +1 -0
- package/fesm2015/ngx-formly-ionic.mjs +63 -0
- package/fesm2015/ngx-formly-ionic.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-checkbox.mjs +83 -0
- package/fesm2020/ngx-formly-ionic-checkbox.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-datetime.mjs +184 -0
- package/fesm2020/ngx-formly-ionic-datetime.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-form-field.mjs +122 -0
- package/fesm2020/ngx-formly-ionic-form-field.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-input.mjs +135 -0
- package/fesm2020/ngx-formly-ionic-input.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-radio.mjs +125 -0
- package/fesm2020/ngx-formly-ionic-radio.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-select.mjs +132 -0
- package/fesm2020/ngx-formly-ionic-select.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-slider.mjs +80 -0
- package/fesm2020/ngx-formly-ionic-slider.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-textarea.mjs +82 -0
- package/fesm2020/ngx-formly-ionic-textarea.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic-toggle.mjs +75 -0
- package/fesm2020/ngx-formly-ionic-toggle.mjs.map +1 -0
- package/fesm2020/ngx-formly-ionic.mjs +63 -0
- package/fesm2020/ngx-formly-ionic.mjs.map +1 -0
- package/form-field/form-field.module.d.ts +12 -0
- package/form-field/form-field.wrapper.d.ts +12 -0
- package/form-field/formly.attributes.d.ts +7 -0
- package/form-field/ngx-formly-ionic-form-field.d.ts +5 -0
- package/form-field/package.json +10 -0
- package/form-field/public_api.d.ts +3 -0
- package/input/input.module.d.ts +12 -0
- package/input/input.type.d.ts +14 -0
- package/input/ngx-formly-ionic-input.d.ts +5 -0
- package/input/package.json +10 -0
- package/input/public_api.d.ts +2 -0
- package/lib/ui-ionic.d.ts +0 -2
- package/lib/ui-ionic.module.d.ts +13 -0
- package/ngx-formly-ionic.d.ts +1 -2
- package/package.json +102 -33
- package/radio/ngx-formly-ionic-radio.d.ts +5 -0
- package/radio/package.json +10 -0
- package/radio/public_api.d.ts +2 -0
- package/radio/radio.module.d.ts +13 -0
- package/radio/radio.type.d.ts +14 -0
- package/select/ngx-formly-ionic-select.d.ts +5 -0
- package/select/package.json +10 -0
- package/select/public_api.d.ts +2 -0
- package/select/select.module.d.ts +13 -0
- package/select/select.type.d.ts +25 -0
- package/slider/ngx-formly-ionic-slider.d.ts +5 -0
- package/slider/package.json +10 -0
- package/slider/public_api.d.ts +2 -0
- package/slider/slider.module.d.ts +12 -0
- package/slider/slider.type.d.ts +14 -0
- package/textarea/ngx-formly-ionic-textarea.d.ts +5 -0
- package/textarea/package.json +10 -0
- package/textarea/public_api.d.ts +2 -0
- package/textarea/textarea.module.d.ts +12 -0
- package/textarea/textarea.type.d.ts +14 -0
- package/toggle/ngx-formly-ionic-toggle.d.ts +5 -0
- package/toggle/package.json +10 -0
- package/toggle/public_api.d.ts +2 -0
- package/toggle/toggle.module.d.ts +12 -0
- package/toggle/toggle.type.d.ts +14 -0
- package/bundles/ngx-formly-ionic.umd.js +0 -401
- package/bundles/ngx-formly-ionic.umd.js.map +0 -1
- package/bundles/ngx-formly-ionic.umd.min.js +0 -2
- package/bundles/ngx-formly-ionic.umd.min.js.map +0 -1
- package/esm2015/lib/formly.attributes.js +0 -46
- package/esm2015/lib/types/checkbox.js +0 -20
- package/esm2015/lib/types/datetime.js +0 -36
- package/esm2015/lib/types/input.js +0 -21
- package/esm2015/lib/types/radio.js +0 -46
- package/esm2015/lib/types/range.js +0 -25
- package/esm2015/lib/types/select.js +0 -55
- package/esm2015/lib/types/textarea.js +0 -23
- package/esm2015/lib/types/toggle.js +0 -20
- package/esm2015/lib/types/types.js +0 -13
- package/esm2015/lib/ui-ionic.config.js +0 -69
- package/esm2015/lib/ui-ionic.js +0 -8
- package/esm2015/lib/ui-ionic.module.js +0 -28
- package/esm2015/lib/wrappers/form-field.js +0 -32
- package/esm2015/lib/wrappers/wrappers.js +0 -6
- package/esm2015/ngx-formly-ionic.js +0 -11
- package/esm2015/public_api.js +0 -9
- package/esm5/lib/formly.attributes.js +0 -58
- package/esm5/lib/types/checkbox.js +0 -22
- package/esm5/lib/types/datetime.js +0 -22
- package/esm5/lib/types/input.js +0 -23
- package/esm5/lib/types/radio.js +0 -30
- package/esm5/lib/types/range.js +0 -23
- package/esm5/lib/types/select.js +0 -41
- package/esm5/lib/types/textarea.js +0 -23
- package/esm5/lib/types/toggle.js +0 -22
- package/esm5/lib/types/types.js +0 -13
- package/esm5/lib/ui-ionic.config.js +0 -69
- package/esm5/lib/ui-ionic.js +0 -8
- package/esm5/lib/ui-ionic.module.js +0 -32
- package/esm5/lib/wrappers/form-field.js +0 -22
- package/esm5/lib/wrappers/wrappers.js +0 -6
- package/esm5/ngx-formly-ionic.js +0 -11
- package/esm5/public_api.js +0 -9
- package/fesm2015/ngx-formly-ionic.js +0 -414
- package/fesm2015/ngx-formly-ionic.js.map +0 -1
- package/fesm5/ngx-formly-ionic.js +0 -360
- package/fesm5/ngx-formly-ionic.js.map +0 -1
- package/lib/formly.attributes.d.ts +0 -5
- package/lib/types/checkbox.d.ts +0 -3
- package/lib/types/datetime.d.ts +0 -3
- package/lib/types/input.d.ts +0 -3
- package/lib/types/radio.d.ts +0 -8
- package/lib/types/range.d.ts +0 -3
- package/lib/types/select.d.ts +0 -9
- package/lib/types/textarea.d.ts +0 -3
- package/lib/types/toggle.d.ts +0 -3
- package/lib/types/types.d.ts +0 -8
- package/lib/ui-ionic.config.d.ts +0 -4
- package/lib/wrappers/form-field.d.ts +0 -3
- package/lib/wrappers/wrappers.d.ts +0 -1
- package/ngx-formly-ionic.metadata.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-ionic-datetime.mjs","sources":["../../../../src/ui/ionic/datetime/src/datetime.type.ts","../../../../src/ui/ionic/datetime/src/datetime.module.ts","../../../../src/ui/ionic/datetime/src/ngx-formly-ionic-datetime.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, ViewEncapsulation, Type } from '@angular/core';\nimport { IonDatetime } from '@ionic/angular';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/ionic/form-field';\n\ninterface DatetimeProps extends FormlyFieldProps {\n presentation?: 'date' | 'date-time' | 'month' | 'month-year' | 'time' | 'time-date' | 'year';\n locale?: any;\n cancelText?: string;\n doneText?: string;\n dayValues?: number | number[] | string | undefined;\n hourValues?: number | number[] | string | undefined;\n minuteValues?: number | number[] | string | undefined;\n monthValues?: number | number[] | string | undefined;\n yearValues?: number | number[] | string | undefined;\n minDate?: string | undefined;\n maxDate?: string | undefined;\n displayFormat?: string;\n}\n\nexport interface FormlyDatetimeFieldConfig extends FormlyFieldConfig<DatetimeProps> {\n type: 'datetime' | Type<FormlyFieldDatetime>;\n}\n\n@Component({\n selector: 'formly-field-ion-datetime',\n template: `\n <ion-item [button]=\"true\" [detail]=\"false\" (click)=\"isOpen = true\">\n <ion-label>\n {{ formControl.value ? (formControl.value | date: displayFormat()) : props.placeholder }}\n </ion-label>\n </ion-item>\n <ion-modal\n [isOpen]=\"isOpen\"\n (didDismiss)=\"close()\"\n [cssClass]=\"'ion-datetime-modal ion-datetime-modal-' + props.presentation\"\n >\n <ng-template>\n <ion-datetime\n [locale]=\"props.locale\"\n [presentation]=\"props.presentation\"\n [cancelText]=\"props.cancelText\"\n [dayValues]=\"props.dayValues\"\n [doneText]=\"props.doneText\"\n [hourValues]=\"props.hourValues\"\n [minuteValues]=\"props.minuteValues\"\n [monthValues]=\"props.monthValues\"\n [yearValues]=\"props.yearValues\"\n [min]=\"props.minDate ? props.minDate : props.min\"\n [max]=\"props.maxDate ? props.maxDate : props.max\"\n [formControl]=\"formControl\"\n [ionFormlyAttributes]=\"field\"\n >\n <ion-buttons slot=\"buttons\">\n <ion-button (click)=\"reset()\">{{ props.cancelText || 'Cancel' }}</ion-button>\n <ion-button (click)=\"confirm()\">{{ props.doneText || 'Done' }}</ion-button>\n </ion-buttons>\n </ion-datetime>\n </ng-template>\n </ion-modal>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./dattime.type.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyFieldDatetime extends FieldType<FieldTypeConfig<DatetimeProps>> {\n @ViewChild(IonDatetime) datetime!: IonDatetime;\n isOpen = false;\n\n override defaultOptions = {\n props: {\n presentation: 'month-year' as const,\n },\n };\n\n displayFormat() {\n if (this.props.displayFormat) {\n return this.props.displayFormat;\n }\n\n switch (this.props.presentation) {\n case 'date-time':\n case 'time-date':\n return 'short';\n case 'time':\n return 'shortTime';\n case 'month':\n return 'MMMM';\n case 'month-year':\n return 'MMMM, y';\n case 'year':\n return 'y';\n case 'date':\n return 'mediumDate';\n }\n }\n\n confirm() {\n this.datetime?.confirm();\n this.close();\n }\n\n reset() {\n this.datetime?.reset();\n this.close();\n }\n\n close() {\n this.isOpen = false;\n this.formControl.markAsTouched();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { IonicModule } from '@ionic/angular';\nimport { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';\n\nimport { FormlyFieldDatetime } from './datetime.type';\n\n@NgModule({\n declarations: [FormlyFieldDatetime],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonicModule,\n FormlyFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'datetime',\n component: FormlyFieldDatetime,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyDatetimeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAiE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9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;AACH,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAlBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,WAAW;wBACX,qBAAqB;wBACrB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, Directive, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@ngx-formly/core';
|
|
6
|
+
import { FieldWrapper, ɵFormlyAttributes, FormlyModule } from '@ngx-formly/core';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import * as i1 from '@ionic/angular';
|
|
9
|
+
import { IonicModule } from '@ionic/angular';
|
|
10
|
+
|
|
11
|
+
class FormlyWrapperFormField extends FieldWrapper {
|
|
12
|
+
}
|
|
13
|
+
FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyWrapperFormField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyWrapperFormField, selector: "formly-wrapper-ion-form-field", usesInheritance: true, ngImport: i0, template: `
|
|
15
|
+
<ion-item [lines]="props.itemLines">
|
|
16
|
+
<ion-label [position]="props.labelPosition">
|
|
17
|
+
{{ props.label }}
|
|
18
|
+
<span *ngIf="props.required && props.hideRequiredMarker !== true" aria-hidden="true">*</span>
|
|
19
|
+
</ion-label>
|
|
20
|
+
<ng-template #fieldComponent></ng-template>
|
|
21
|
+
</ion-item>
|
|
22
|
+
<ion-item lines="none" *ngIf="showError">
|
|
23
|
+
<ion-label>
|
|
24
|
+
<ion-text color="danger">
|
|
25
|
+
<p>
|
|
26
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
27
|
+
</p>
|
|
28
|
+
</ion-text>
|
|
29
|
+
</ion-label>
|
|
30
|
+
</ion-item>
|
|
31
|
+
`, isInline: true, components: [{ type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { type: i2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{
|
|
35
|
+
selector: 'formly-wrapper-ion-form-field',
|
|
36
|
+
template: `
|
|
37
|
+
<ion-item [lines]="props.itemLines">
|
|
38
|
+
<ion-label [position]="props.labelPosition">
|
|
39
|
+
{{ props.label }}
|
|
40
|
+
<span *ngIf="props.required && props.hideRequiredMarker !== true" aria-hidden="true">*</span>
|
|
41
|
+
</ion-label>
|
|
42
|
+
<ng-template #fieldComponent></ng-template>
|
|
43
|
+
</ion-item>
|
|
44
|
+
<ion-item lines="none" *ngIf="showError">
|
|
45
|
+
<ion-label>
|
|
46
|
+
<ion-text color="danger">
|
|
47
|
+
<p>
|
|
48
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
49
|
+
</p>
|
|
50
|
+
</ion-text>
|
|
51
|
+
</ion-label>
|
|
52
|
+
</ion-item>
|
|
53
|
+
`,
|
|
54
|
+
}]
|
|
55
|
+
}] });
|
|
56
|
+
|
|
57
|
+
class IonFormlyAttributes extends ɵFormlyAttributes {
|
|
58
|
+
}
|
|
59
|
+
IonFormlyAttributes.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: IonFormlyAttributes, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
60
|
+
IonFormlyAttributes.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: IonFormlyAttributes, selector: "[ionFormlyAttributes]", inputs: { field: ["ionFormlyAttributes", "field"] }, host: { listeners: { "ionFocus": "onFocus($event)", "ionBlur": "onBlur($event)", "ionChange": "onChange($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: IonFormlyAttributes, decorators: [{
|
|
62
|
+
type: Directive,
|
|
63
|
+
args: [{
|
|
64
|
+
// eslint-disable-next-line
|
|
65
|
+
selector: '[ionFormlyAttributes]',
|
|
66
|
+
host: {
|
|
67
|
+
'(ionFocus)': 'onFocus($event)',
|
|
68
|
+
'(ionBlur)': 'onBlur($event)',
|
|
69
|
+
'(ionChange)': 'onChange($event)',
|
|
70
|
+
},
|
|
71
|
+
}]
|
|
72
|
+
}], propDecorators: { field: [{
|
|
73
|
+
type: Input,
|
|
74
|
+
args: ['ionFormlyAttributes']
|
|
75
|
+
}] } });
|
|
76
|
+
|
|
77
|
+
class FormlyFormFieldModule {
|
|
78
|
+
}
|
|
79
|
+
FormlyFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
80
|
+
FormlyFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFormFieldModule, declarations: [FormlyWrapperFormField, IonFormlyAttributes], imports: [CommonModule,
|
|
81
|
+
ReactiveFormsModule,
|
|
82
|
+
IonicModule, i2.FormlyModule], exports: [IonFormlyAttributes] });
|
|
83
|
+
FormlyFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFormFieldModule, imports: [[
|
|
84
|
+
CommonModule,
|
|
85
|
+
ReactiveFormsModule,
|
|
86
|
+
IonicModule,
|
|
87
|
+
FormlyModule.forChild({
|
|
88
|
+
wrappers: [
|
|
89
|
+
{
|
|
90
|
+
name: 'form-field',
|
|
91
|
+
component: FormlyWrapperFormField,
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
}),
|
|
95
|
+
]] });
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFormFieldModule, decorators: [{
|
|
97
|
+
type: NgModule,
|
|
98
|
+
args: [{
|
|
99
|
+
declarations: [FormlyWrapperFormField, IonFormlyAttributes],
|
|
100
|
+
exports: [IonFormlyAttributes],
|
|
101
|
+
imports: [
|
|
102
|
+
CommonModule,
|
|
103
|
+
ReactiveFormsModule,
|
|
104
|
+
IonicModule,
|
|
105
|
+
FormlyModule.forChild({
|
|
106
|
+
wrappers: [
|
|
107
|
+
{
|
|
108
|
+
name: 'form-field',
|
|
109
|
+
component: FormlyWrapperFormField,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
}),
|
|
113
|
+
],
|
|
114
|
+
}]
|
|
115
|
+
}] });
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Generated bundle index. Do not edit.
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
export { FormlyFormFieldModule, IonFormlyAttributes as ɵIonFormlyAttributes };
|
|
122
|
+
//# sourceMappingURL=ngx-formly-ionic-form-field.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-ionic-form-field.mjs","sources":["../../../../src/ui/ionic/form-field/src/form-field.wrapper.ts","../../../../src/ui/ionic/form-field/src/formly.attributes.ts","../../../../src/ui/ionic/form-field/src/form-field.module.ts","../../../../src/ui/ionic/form-field/src/ngx-formly-ionic-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { IonItem, IonLabel } from '@ionic/angular';\nimport { FieldWrapper, FormlyFieldConfig, FormlyFieldProps as CoreFormlyFieldProps } from '@ngx-formly/core';\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n hideRequiredMarker?: boolean;\n itemLines?: IonItem['lines'];\n labelPosition?: IonLabel['position'];\n}\n\n@Component({\n selector: 'formly-wrapper-ion-form-field',\n template: `\n <ion-item [lines]=\"props.itemLines\">\n <ion-label [position]=\"props.labelPosition\">\n {{ props.label }}\n <span *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </ion-label>\n <ng-template #fieldComponent></ng-template>\n </ion-item>\n <ion-item lines=\"none\" *ngIf=\"showError\">\n <ion-label>\n <ion-text color=\"danger\">\n <p>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </p>\n </ion-text>\n </ion-label>\n </ion-item>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> {}\n","import { Directive, Input } from '@angular/core';\nimport { ɵFormlyAttributes as FormlyAttributes, FormlyFieldConfig } from '@ngx-formly/core';\n\n@Directive({\n // eslint-disable-next-line\n selector: '[ionFormlyAttributes]',\n host: {\n '(ionFocus)': 'onFocus($event)',\n '(ionBlur)': 'onBlur($event)',\n '(ionChange)': 'onChange($event)',\n },\n})\nexport class IonFormlyAttributes extends FormlyAttributes {\n @Input('ionFormlyAttributes') override field: FormlyFieldConfig;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { IonicModule } from '@ionic/angular';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\nimport { IonFormlyAttributes } from './formly.attributes';\n\n@NgModule({\n declarations: [FormlyWrapperFormField, IonFormlyAttributes],\n exports: [IonFormlyAttributes],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonicModule,\n\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n }),\n ],\n})\nexport class FormlyFormFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FormlyAttributes"],"mappings":";;;;;;;;;;AA+BM,MAAO,sBAAuB,SAAQ,YAAiD,CAAA;;mHAAhF,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAnBvB,QAAA,EAAA,+BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;AAiBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,OAA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wBAAA,IAAI,EAAE,YAAY;AAClB,wBAAA,SAAS,EAAE,sBAAsB;AAClC,qBAAA;AACF,iBAAA;aACF,CAAC;AACH,SAAA,CAAA,EAAA,CAAA,CAAA;2FAEU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAlBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;oBAC3D,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,WAAW;wBAEX,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,QAAQ,EAAE;AACR,gCAAA;AACE,oCAAA,IAAI,EAAE,YAAY;AAClB,oCAAA,SAAS,EAAE,sBAAsB;AAClC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1$1 from '@ngx-formly/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
|
7
|
+
import * as i3 from '@angular/forms';
|
|
8
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import * as i1 from '@ionic/angular';
|
|
10
|
+
import { IonicModule } from '@ionic/angular';
|
|
11
|
+
import * as i4 from '@ngx-formly/ionic/form-field';
|
|
12
|
+
import { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';
|
|
13
|
+
|
|
14
|
+
class FormlyFieldInput extends FieldType {
|
|
15
|
+
}
|
|
16
|
+
FormlyFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldInput, selector: "formly-field-ion-input", usesInheritance: true, ngImport: i0, template: `
|
|
18
|
+
<ion-input
|
|
19
|
+
*ngIf="props.type !== 'number'; else numberTmp"
|
|
20
|
+
[type]="props.type || 'text'"
|
|
21
|
+
[formControl]="formControl"
|
|
22
|
+
[ionFormlyAttributes]="field"
|
|
23
|
+
></ion-input>
|
|
24
|
+
<ng-template #numberTmp>
|
|
25
|
+
<ion-input type="number" [formControl]="formControl" [ionFormlyAttributes]="field"></ion-input>
|
|
26
|
+
</ng-template>
|
|
27
|
+
`, isInline: true, styles: [":host{display:inherit}\n"], components: [{ type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "size", "spellcheck", "step", "type", "value"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵIonFormlyAttributes, selector: "[ionFormlyAttributes]", inputs: ["ionFormlyAttributes"] }, { type: i1.NumericValueAccessor, selector: "ion-input[type=number]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldInput, decorators: [{
|
|
29
|
+
type: Component,
|
|
30
|
+
args: [{
|
|
31
|
+
selector: 'formly-field-ion-input',
|
|
32
|
+
template: `
|
|
33
|
+
<ion-input
|
|
34
|
+
*ngIf="props.type !== 'number'; else numberTmp"
|
|
35
|
+
[type]="props.type || 'text'"
|
|
36
|
+
[formControl]="formControl"
|
|
37
|
+
[ionFormlyAttributes]="field"
|
|
38
|
+
></ion-input>
|
|
39
|
+
<ng-template #numberTmp>
|
|
40
|
+
<ion-input type="number" [formControl]="formControl" [ionFormlyAttributes]="field"></ion-input>
|
|
41
|
+
</ng-template>
|
|
42
|
+
`,
|
|
43
|
+
styles: [':host { display: inherit; }'],
|
|
44
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
|
|
48
|
+
class FormlyInputModule {
|
|
49
|
+
}
|
|
50
|
+
FormlyInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
51
|
+
FormlyInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
|
|
52
|
+
ReactiveFormsModule,
|
|
53
|
+
IonicModule,
|
|
54
|
+
FormlyFormFieldModule, i1$1.FormlyModule] });
|
|
55
|
+
FormlyInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyInputModule, imports: [[
|
|
56
|
+
CommonModule,
|
|
57
|
+
ReactiveFormsModule,
|
|
58
|
+
IonicModule,
|
|
59
|
+
FormlyFormFieldModule,
|
|
60
|
+
FormlyModule.forChild({
|
|
61
|
+
types: [
|
|
62
|
+
{
|
|
63
|
+
name: 'input',
|
|
64
|
+
component: FormlyFieldInput,
|
|
65
|
+
wrappers: ['form-field'],
|
|
66
|
+
},
|
|
67
|
+
{ name: 'string', extends: 'input' },
|
|
68
|
+
{
|
|
69
|
+
name: 'number',
|
|
70
|
+
extends: 'input',
|
|
71
|
+
defaultOptions: {
|
|
72
|
+
props: {
|
|
73
|
+
type: 'number',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'integer',
|
|
79
|
+
extends: 'input',
|
|
80
|
+
defaultOptions: {
|
|
81
|
+
props: {
|
|
82
|
+
type: 'number',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
}),
|
|
88
|
+
]] });
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyInputModule, decorators: [{
|
|
90
|
+
type: NgModule,
|
|
91
|
+
args: [{
|
|
92
|
+
declarations: [FormlyFieldInput],
|
|
93
|
+
imports: [
|
|
94
|
+
CommonModule,
|
|
95
|
+
ReactiveFormsModule,
|
|
96
|
+
IonicModule,
|
|
97
|
+
FormlyFormFieldModule,
|
|
98
|
+
FormlyModule.forChild({
|
|
99
|
+
types: [
|
|
100
|
+
{
|
|
101
|
+
name: 'input',
|
|
102
|
+
component: FormlyFieldInput,
|
|
103
|
+
wrappers: ['form-field'],
|
|
104
|
+
},
|
|
105
|
+
{ name: 'string', extends: 'input' },
|
|
106
|
+
{
|
|
107
|
+
name: 'number',
|
|
108
|
+
extends: 'input',
|
|
109
|
+
defaultOptions: {
|
|
110
|
+
props: {
|
|
111
|
+
type: 'number',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'integer',
|
|
117
|
+
extends: 'input',
|
|
118
|
+
defaultOptions: {
|
|
119
|
+
props: {
|
|
120
|
+
type: 'number',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
}),
|
|
126
|
+
],
|
|
127
|
+
}]
|
|
128
|
+
}] });
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Generated bundle index. Do not edit.
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
export { FormlyFieldInput, FormlyInputModule };
|
|
135
|
+
//# sourceMappingURL=ngx-formly-ionic-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-ionic-input.mjs","sources":["../../../../src/ui/ionic/input/src/input.type.ts","../../../../src/ui/ionic/input/src/input.module.ts","../../../../src/ui/ionic/input/src/ngx-formly-ionic-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/ionic/form-field';\n\ninterface InputProps extends FormlyFieldProps {}\n\nexport interface FormlyInputFieldConfig extends FormlyFieldConfig<InputProps> {\n type: 'input' | Type<FormlyFieldInput>;\n}\n\n@Component({\n selector: 'formly-field-ion-input',\n template: `\n <ion-input\n *ngIf=\"props.type !== 'number'; else numberTmp\"\n [type]=\"props.type || 'text'\"\n [formControl]=\"formControl\"\n [ionFormlyAttributes]=\"field\"\n ></ion-input>\n <ng-template #numberTmp>\n <ion-input type=\"number\" [formControl]=\"formControl\" [ionFormlyAttributes]=\"field\"></ion-input>\n </ng-template>\n `,\n styles: [':host { display: inherit; }'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig<InputProps>> {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { IonicModule } from '@ionic/angular';\nimport { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';\n\nimport { FormlyFieldInput } from './input.type';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonicModule,\n FormlyFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n ],\n }),\n ],\n})\nexport class FormlyInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AA0BM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;;6GAA/D,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAdjB,QAAA,EAAA,wBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,0BAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,aAAA,EAAA,WAAA,EAAA,YAAA,EAAA,aAAA,EAAA,OAAA,EAAA,UAAA,EAAA,UAAA,EAAA,cAAA,EAAA,WAAA,EAAA,KAAA,EAAA,WAAA,EAAA,KAAA,EAAA,WAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,SAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,MAAA,EAAA,YAAA,E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OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,WAAW;wBACX,qBAAqB;wBACrB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE;AACpC,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,OAAO,EAAE,OAAO;AAChB,oCAAA,cAAc,EAAE;AACd,wCAAA,KAAK,EAAE;AACL,4CAAA,IAAI,EAAE,QAAQ;AACf,yCAAA;AACF,qCAAA;AACF,iCAAA;AACD,gCAAA;AACE,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,OAAO,EAAE,OAAO;AAChB,oCAAA,cAAc,EAAE;AACd,wCAAA,KAAK,EAAE;AACL,4CAAA,IAAI,EAAE,QAAQ;AACf,yCAAA;AACF,qCAAA;AACF,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC7CD;;AAEG;;;;"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import * as i5 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@ngx-formly/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
|
7
|
+
import * as i3 from '@angular/forms';
|
|
8
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import * as i1 from '@ionic/angular';
|
|
10
|
+
import { IonicModule } from '@ionic/angular';
|
|
11
|
+
import * as i6 from '@ngx-formly/core/select';
|
|
12
|
+
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
13
|
+
import * as i4 from '@ngx-formly/ionic/form-field';
|
|
14
|
+
import { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';
|
|
15
|
+
|
|
16
|
+
class FormlyFieldRadio extends FieldType {
|
|
17
|
+
}
|
|
18
|
+
FormlyFieldRadio.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldRadio, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
FormlyFieldRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldRadio, selector: "formly-field-ion-radio", usesInheritance: true, ngImport: i0, template: `
|
|
20
|
+
<ion-list>
|
|
21
|
+
<ion-radio-group [formControl]="formControl" [ionFormlyAttributes]="field">
|
|
22
|
+
<ion-list-header>{{ props.label }}</ion-list-header>
|
|
23
|
+
<ion-item
|
|
24
|
+
*ngFor="let option of props.options | formlySelectOptions: field | async"
|
|
25
|
+
[disabled]="option.disabled || formControl.disabled"
|
|
26
|
+
>
|
|
27
|
+
<ion-label>{{ option.label }}</ion-label>
|
|
28
|
+
<ion-radio [value]="option.value"></ion-radio>
|
|
29
|
+
</ion-item>
|
|
30
|
+
</ion-radio-group>
|
|
31
|
+
</ion-list>
|
|
32
|
+
<ion-item lines="none" *ngIf="showError">
|
|
33
|
+
<ion-label>
|
|
34
|
+
<ion-text color="danger">
|
|
35
|
+
<p>
|
|
36
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
37
|
+
</p>
|
|
38
|
+
</ion-text>
|
|
39
|
+
</ion-label>
|
|
40
|
+
</ion-item>
|
|
41
|
+
`, isInline: true, components: [{ type: i1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { type: i1.IonRadioGroup, selector: "ion-radio-group", inputs: ["allowEmptySelection", "name", "value"] }, { type: i1.IonListHeader, selector: "ion-list-header", inputs: ["color", "lines", "mode"] }, { type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { type: i1.IonRadio, selector: "ion-radio", inputs: ["color", "disabled", "mode", "name", "value"] }, { type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { type: i2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i1.SelectValueAccessor, selector: "ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵIonFormlyAttributes, selector: "[ionFormlyAttributes]", inputs: ["ionFormlyAttributes"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.RadioValueAccessor, selector: "ion-radio" }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe, "formlySelectOptions": i6.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldRadio, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{
|
|
45
|
+
selector: 'formly-field-ion-radio',
|
|
46
|
+
template: `
|
|
47
|
+
<ion-list>
|
|
48
|
+
<ion-radio-group [formControl]="formControl" [ionFormlyAttributes]="field">
|
|
49
|
+
<ion-list-header>{{ props.label }}</ion-list-header>
|
|
50
|
+
<ion-item
|
|
51
|
+
*ngFor="let option of props.options | formlySelectOptions: field | async"
|
|
52
|
+
[disabled]="option.disabled || formControl.disabled"
|
|
53
|
+
>
|
|
54
|
+
<ion-label>{{ option.label }}</ion-label>
|
|
55
|
+
<ion-radio [value]="option.value"></ion-radio>
|
|
56
|
+
</ion-item>
|
|
57
|
+
</ion-radio-group>
|
|
58
|
+
</ion-list>
|
|
59
|
+
<ion-item lines="none" *ngIf="showError">
|
|
60
|
+
<ion-label>
|
|
61
|
+
<ion-text color="danger">
|
|
62
|
+
<p>
|
|
63
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
64
|
+
</p>
|
|
65
|
+
</ion-text>
|
|
66
|
+
</ion-label>
|
|
67
|
+
</ion-item>
|
|
68
|
+
`,
|
|
69
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
70
|
+
}]
|
|
71
|
+
}] });
|
|
72
|
+
|
|
73
|
+
class FormlyRadioModule {
|
|
74
|
+
}
|
|
75
|
+
FormlyRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
76
|
+
FormlyRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyRadioModule, declarations: [FormlyFieldRadio], imports: [CommonModule,
|
|
77
|
+
ReactiveFormsModule,
|
|
78
|
+
IonicModule,
|
|
79
|
+
FormlyFormFieldModule,
|
|
80
|
+
FormlySelectModule, i2.FormlyModule] });
|
|
81
|
+
FormlyRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyRadioModule, imports: [[
|
|
82
|
+
CommonModule,
|
|
83
|
+
ReactiveFormsModule,
|
|
84
|
+
IonicModule,
|
|
85
|
+
FormlyFormFieldModule,
|
|
86
|
+
FormlySelectModule,
|
|
87
|
+
FormlyModule.forChild({
|
|
88
|
+
types: [
|
|
89
|
+
{
|
|
90
|
+
name: 'radio',
|
|
91
|
+
component: FormlyFieldRadio,
|
|
92
|
+
wrappers: [],
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
}),
|
|
96
|
+
]] });
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyRadioModule, decorators: [{
|
|
98
|
+
type: NgModule,
|
|
99
|
+
args: [{
|
|
100
|
+
declarations: [FormlyFieldRadio],
|
|
101
|
+
imports: [
|
|
102
|
+
CommonModule,
|
|
103
|
+
ReactiveFormsModule,
|
|
104
|
+
IonicModule,
|
|
105
|
+
FormlyFormFieldModule,
|
|
106
|
+
FormlySelectModule,
|
|
107
|
+
FormlyModule.forChild({
|
|
108
|
+
types: [
|
|
109
|
+
{
|
|
110
|
+
name: 'radio',
|
|
111
|
+
component: FormlyFieldRadio,
|
|
112
|
+
wrappers: [],
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
}),
|
|
116
|
+
],
|
|
117
|
+
}]
|
|
118
|
+
}] });
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Generated bundle index. Do not edit.
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
export { FormlyFieldRadio, FormlyRadioModule };
|
|
125
|
+
//# sourceMappingURL=ngx-formly-ionic-radio.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-ionic-radio.mjs","sources":["../../../../src/ui/ionic/radio/src/radio.type.ts","../../../../src/ui/ionic/radio/src/radio.module.ts","../../../../src/ui/ionic/radio/src/ngx-formly-ionic-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/ionic/form-field';\n\ninterface RadioProps extends FormlyFieldProps {}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-ion-radio',\n template: `\n <ion-list>\n <ion-radio-group [formControl]=\"formControl\" [ionFormlyAttributes]=\"field\">\n <ion-list-header>{{ props.label }}</ion-list-header>\n <ion-item\n *ngFor=\"let option of props.options | formlySelectOptions: field | async\"\n [disabled]=\"option.disabled || formControl.disabled\"\n >\n <ion-label>{{ option.label }}</ion-label>\n <ion-radio [value]=\"option.value\"></ion-radio>\n </ion-item>\n </ion-radio-group>\n </ion-list>\n <ion-item lines=\"none\" *ngIf=\"showError\">\n <ion-label>\n <ion-text color=\"danger\">\n <p>\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </p>\n </ion-text>\n </ion-label>\n </ion-item>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { IonicModule } from '@ionic/angular';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonicModule,\n\n FormlyFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: [],\n },\n ],\n }),\n ],\n})\nexport class FormlyRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAqCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;;6GAA/D,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,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AAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,WAAW;wBAEX,qBAAqB;wBACrB,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;AAC3B,oCAAA,QAAQ,EAAE,EAAE;AACb,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i1$1 from '@ngx-formly/core';
|
|
8
|
+
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
|
9
|
+
import * as i1 from '@ionic/angular';
|
|
10
|
+
import { IonicModule } from '@ionic/angular';
|
|
11
|
+
import * as i5 from '@ngx-formly/core/select';
|
|
12
|
+
import { FormlySelectModule as FormlySelectModule$1 } from '@ngx-formly/core/select';
|
|
13
|
+
import * as i4 from '@ngx-formly/ionic/form-field';
|
|
14
|
+
import { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';
|
|
15
|
+
|
|
16
|
+
class FormlyFieldSelect extends FieldType {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.defaultOptions = {
|
|
20
|
+
props: {
|
|
21
|
+
compareWith(o1, o2) {
|
|
22
|
+
return o1 === o2;
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldSelect, selector: "formly-field-ion-select", usesInheritance: true, ngImport: i0, template: `
|
|
30
|
+
<!-- ng-container used as a workaround for https://github.com/ionic-team/ionic/issues/19324 -->
|
|
31
|
+
<ng-container *ngIf="props.options | formlySelectOptions: field | async; let selectOptions">
|
|
32
|
+
<ion-select
|
|
33
|
+
[style.align-self]="props.labelPosition === 'floating' ? 'stretch' : ''"
|
|
34
|
+
[style.max-width.%]="props.labelPosition === 'floating' ? 100 : ''"
|
|
35
|
+
[formControl]="formControl"
|
|
36
|
+
[compareWith]="props.compareWith"
|
|
37
|
+
[ionFormlyAttributes]="field"
|
|
38
|
+
[multiple]="props.multiple"
|
|
39
|
+
[interface]="props.interface"
|
|
40
|
+
[okText]="props.okText"
|
|
41
|
+
[cancelText]="props.cancelText"
|
|
42
|
+
>
|
|
43
|
+
<ion-select-option *ngFor="let option of selectOptions" [value]="option.value" [disabled]="option.disabled">
|
|
44
|
+
{{ option.label }}
|
|
45
|
+
</ion-select-option>
|
|
46
|
+
</ion-select>
|
|
47
|
+
</ng-container>
|
|
48
|
+
`, isInline: true, styles: [":host{display:inherit}\n"], components: [{ type: i1.IonSelect, selector: "ion-select", inputs: ["cancelText", "compareWith", "disabled", "interface", "interfaceOptions", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "value"] }, { type: i1.IonSelectOption, selector: "ion-select-option", inputs: ["disabled", "value"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.SelectValueAccessor, selector: "ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵIonFormlyAttributes, selector: "[ionFormlyAttributes]", inputs: ["ionFormlyAttributes"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i2.AsyncPipe, "formlySelectOptions": i5.FormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: 'formly-field-ion-select',
|
|
53
|
+
template: `
|
|
54
|
+
<!-- ng-container used as a workaround for https://github.com/ionic-team/ionic/issues/19324 -->
|
|
55
|
+
<ng-container *ngIf="props.options | formlySelectOptions: field | async; let selectOptions">
|
|
56
|
+
<ion-select
|
|
57
|
+
[style.align-self]="props.labelPosition === 'floating' ? 'stretch' : ''"
|
|
58
|
+
[style.max-width.%]="props.labelPosition === 'floating' ? 100 : ''"
|
|
59
|
+
[formControl]="formControl"
|
|
60
|
+
[compareWith]="props.compareWith"
|
|
61
|
+
[ionFormlyAttributes]="field"
|
|
62
|
+
[multiple]="props.multiple"
|
|
63
|
+
[interface]="props.interface"
|
|
64
|
+
[okText]="props.okText"
|
|
65
|
+
[cancelText]="props.cancelText"
|
|
66
|
+
>
|
|
67
|
+
<ion-select-option *ngFor="let option of selectOptions" [value]="option.value" [disabled]="option.disabled">
|
|
68
|
+
{{ option.label }}
|
|
69
|
+
</ion-select-option>
|
|
70
|
+
</ion-select>
|
|
71
|
+
</ng-container>
|
|
72
|
+
`,
|
|
73
|
+
styles: [':host { display: inherit; }'],
|
|
74
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
75
|
+
}]
|
|
76
|
+
}] });
|
|
77
|
+
|
|
78
|
+
class FormlySelectModule {
|
|
79
|
+
}
|
|
80
|
+
FormlySelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlySelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
81
|
+
FormlySelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlySelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
|
|
82
|
+
ReactiveFormsModule,
|
|
83
|
+
IonicModule,
|
|
84
|
+
FormlyFormFieldModule,
|
|
85
|
+
FormlySelectModule$1, i1$1.FormlyModule] });
|
|
86
|
+
FormlySelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlySelectModule, imports: [[
|
|
87
|
+
CommonModule,
|
|
88
|
+
ReactiveFormsModule,
|
|
89
|
+
IonicModule,
|
|
90
|
+
FormlyFormFieldModule,
|
|
91
|
+
FormlySelectModule$1,
|
|
92
|
+
FormlyModule.forChild({
|
|
93
|
+
types: [
|
|
94
|
+
{
|
|
95
|
+
name: 'select',
|
|
96
|
+
component: FormlyFieldSelect,
|
|
97
|
+
wrappers: ['form-field'],
|
|
98
|
+
},
|
|
99
|
+
{ name: 'enum', extends: 'select' },
|
|
100
|
+
],
|
|
101
|
+
}),
|
|
102
|
+
]] });
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlySelectModule, decorators: [{
|
|
104
|
+
type: NgModule,
|
|
105
|
+
args: [{
|
|
106
|
+
declarations: [FormlyFieldSelect],
|
|
107
|
+
imports: [
|
|
108
|
+
CommonModule,
|
|
109
|
+
ReactiveFormsModule,
|
|
110
|
+
IonicModule,
|
|
111
|
+
FormlyFormFieldModule,
|
|
112
|
+
FormlySelectModule$1,
|
|
113
|
+
FormlyModule.forChild({
|
|
114
|
+
types: [
|
|
115
|
+
{
|
|
116
|
+
name: 'select',
|
|
117
|
+
component: FormlyFieldSelect,
|
|
118
|
+
wrappers: ['form-field'],
|
|
119
|
+
},
|
|
120
|
+
{ name: 'enum', extends: 'select' },
|
|
121
|
+
],
|
|
122
|
+
}),
|
|
123
|
+
],
|
|
124
|
+
}]
|
|
125
|
+
}] });
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Generated bundle index. Do not edit.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
export { FormlyFieldSelect, FormlySelectModule };
|
|
132
|
+
//# sourceMappingURL=ngx-formly-ionic-select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-ionic-select.mjs","sources":["../../../../src/ui/ionic/select/src/select.type.ts","../../../../src/ui/ionic/select/src/select.module.ts","../../../../src/ui/ionic/select/src/ngx-formly-ionic-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/ionic/form-field';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n compareWith?: ((currentValue: any, compareValue: any) => boolean) | null | string | undefined;\n multiple?: boolean;\n interface?: 'action-sheet' | 'alert' | 'popover';\n okText?: string;\n cancelText?: string;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-ion-select',\n template: `\n <!-- ng-container used as a workaround for https://github.com/ionic-team/ionic/issues/19324 -->\n <ng-container *ngIf=\"props.options | formlySelectOptions: field | async; let selectOptions\">\n <ion-select\n [style.align-self]=\"props.labelPosition === 'floating' ? 'stretch' : ''\"\n [style.max-width.%]=\"props.labelPosition === 'floating' ? 100 : ''\"\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [ionFormlyAttributes]=\"field\"\n [multiple]=\"props.multiple\"\n [interface]=\"props.interface\"\n [okText]=\"props.okText\"\n [cancelText]=\"props.cancelText\"\n >\n <ion-select-option *ngFor=\"let option of selectOptions\" [value]=\"option.value\" [disabled]=\"option.disabled\">\n {{ option.label }}\n </ion-select-option>\n </ion-select>\n </ng-container>\n `,\n styles: [':host { display: inherit; }'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n override defaultOptions = {\n props: {\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { IonicModule } from '@ionic/angular';\nimport { FormlySelectModule as FormlyCoreSelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonicModule,\n\n FormlyFormFieldModule,\n FormlyCoreSelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\n }),\n ],\n})\nexport class FormlySelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FormlyCoreSelectModule","i1"],"mappings":";;;;;;;;;;;;;;;AA0CM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AAzB9E,IAAA,WAAA,GAAA;;AA0BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;iBAClB;AACF,aAAA;SACF,C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