@ngx-formly/ionic 10.0.1 → 11.1.0-rc.0

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.
Files changed (32) hide show
  1. package/README.md +109 -177
  2. package/fesm2022/ngx-formly-ionic-checkbox.mjs +192 -70
  3. package/fesm2022/ngx-formly-ionic-checkbox.mjs.map +1 -1
  4. package/fesm2022/ngx-formly-ionic-datetime.mjs +349 -119
  5. package/fesm2022/ngx-formly-ionic-datetime.mjs.map +1 -1
  6. package/fesm2022/ngx-formly-ionic-form-field.mjs +259 -81
  7. package/fesm2022/ngx-formly-ionic-form-field.mjs.map +1 -1
  8. package/fesm2022/ngx-formly-ionic-input.mjs +233 -92
  9. package/fesm2022/ngx-formly-ionic-input.mjs.map +1 -1
  10. package/fesm2022/ngx-formly-ionic-radio.mjs +262 -72
  11. package/fesm2022/ngx-formly-ionic-radio.mjs.map +1 -1
  12. package/fesm2022/ngx-formly-ionic-select.mjs +247 -90
  13. package/fesm2022/ngx-formly-ionic-select.mjs.map +1 -1
  14. package/fesm2022/ngx-formly-ionic-slider.mjs +198 -64
  15. package/fesm2022/ngx-formly-ionic-slider.mjs.map +1 -1
  16. package/fesm2022/ngx-formly-ionic-textarea.mjs +194 -67
  17. package/fesm2022/ngx-formly-ionic-textarea.mjs.map +1 -1
  18. package/fesm2022/ngx-formly-ionic-toggle.mjs +189 -66
  19. package/fesm2022/ngx-formly-ionic-toggle.mjs.map +1 -1
  20. package/fesm2022/ngx-formly-ionic.mjs +96 -69
  21. package/fesm2022/ngx-formly-ionic.mjs.map +1 -1
  22. package/package.json +3 -3
  23. package/types/ngx-formly-ionic-checkbox.d.ts +22 -27
  24. package/types/ngx-formly-ionic-datetime.d.ts +43 -47
  25. package/types/ngx-formly-ionic-form-field.d.ts +30 -31
  26. package/types/ngx-formly-ionic-input.d.ts +21 -27
  27. package/types/ngx-formly-ionic-radio.d.ts +21 -26
  28. package/types/ngx-formly-ionic-select.d.ts +34 -38
  29. package/types/ngx-formly-ionic-slider.d.ts +20 -26
  30. package/types/ngx-formly-ionic-textarea.d.ts +21 -27
  31. package/types/ngx-formly-ionic-toggle.d.ts +21 -26
  32. package/types/ngx-formly-ionic.d.ts +17 -21
@@ -1,31 +1,47 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, Component, NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
3
- import * as i1$1 from '@ngx-formly/core';
4
- import { FieldType, FormlyModule } from '@ngx-formly/core';
5
- import * as i1 from '@angular/forms';
6
- import { ReactiveFormsModule } from '@angular/forms';
7
- import * as i2 from '@ionic/angular';
8
- import { IonicModule } from '@ionic/angular';
9
- import * as i3 from '@ngx-formly/ionic/form-field';
10
- import { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';
11
- import * as i4 from '@angular/common';
12
- import { CommonModule } from '@angular/common';
13
- import * as i5 from '@ngx-formly/core/select';
14
- import { FormlySelectModule as FormlySelectModule$1 } from '@ngx-formly/core/select';
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
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
28
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldSelect, isStandalone: false, selector: "formly-field-ion-select", usesInheritance: true, ngImport: i0, template: `
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, NgModule } from "@angular/core";
3
+ import * as i1 from "@ngx-formly/core";
4
+ import { FieldType, FormlyModule } from "@ngx-formly/core";
5
+ import * as i1$1 from "@angular/forms";
6
+ import { ReactiveFormsModule } from "@angular/forms";
7
+ import * as i2 from "@ionic/angular";
8
+ import { IonSelect, IonSelectOption } from "@ionic/angular";
9
+ import * as i3 from "@ngx-formly/ionic/form-field";
10
+ import { FormlyFormFieldModule } from "@ngx-formly/ionic/form-field";
11
+ import * as i4 from "@angular/common";
12
+ import { CommonModule } from "@angular/common";
13
+ import * as i5 from "@ngx-formly/core/select";
14
+ import { FormlySelectModule as FormlySelectModule$1 } from "@ngx-formly/core/select";
15
+ var FormlyFieldSelect = class FormlyFieldSelect extends FieldType {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.defaultOptions = { props: { compareWith(o1, o2) {
19
+ return o1 === o2;
20
+ } } };
21
+ }
22
+ onLabelInteraction(event) {
23
+ if (event.target.closest("a[href]")) event.stopPropagation();
24
+ }
25
+ static {
26
+ this.ɵfac = i0.ɵɵngDeclareFactory({
27
+ minVersion: "12.0.0",
28
+ version: "22.2.2",
29
+ ngImport: i0,
30
+ type: FormlyFieldSelect,
31
+ deps: null,
32
+ target: i0.ɵɵFactoryTarget.Component
33
+ });
34
+ }
35
+ static {
36
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
37
+ minVersion: "17.0.0",
38
+ version: "22.2.2",
39
+ type: FormlyFieldSelect,
40
+ isStandalone: false,
41
+ selector: "formly-field-ion-select",
42
+ usesInheritance: true,
43
+ ngImport: i0,
44
+ template: `
29
45
  <!-- ng-container used as a workaround for https://github.com/ionic-team/ionic/issues/19324 -->
30
46
  @if (props.options | formlySelectOptions: field | async; as selectOptions) {
31
47
  <ion-select
@@ -36,12 +52,20 @@ class FormlyFieldSelect extends FieldType {
36
52
  [ionFormlyAttributes]="field"
37
53
  [multiple]="props.multiple"
38
54
  [interface]="props.interface"
39
- [interfaceOptions]="props.interfaceOptions"
40
- [okText]="props.okText"
41
- [cancelText]="props.cancelText"
42
- [label]="props.label"
55
+ [interfaceOptions]="props.interfaceOptions ?? {}"
56
+ [okText]="props.okText ?? 'OK'"
57
+ [cancelText]="props.cancelText ?? 'Cancel'"
58
+ [label]="props.allowHtml ? undefined : props.label"
43
59
  [labelPlacement]="props.labelPosition ?? 'start'"
44
60
  >
61
+ @if (props.allowHtml && props.label) {
62
+ <span
63
+ slot="label"
64
+ [innerHTML]="props.label"
65
+ (click)="onLabelInteraction($event)"
66
+ (keydown)="onLabelInteraction($event)"
67
+ ></span>
68
+ }
45
69
  @for (option of selectOptions; track option) {
46
70
  <ion-select-option [value]="option.value" [disabled]="option.disabled">
47
71
  {{ option.label }}
@@ -49,11 +73,100 @@ class FormlyFieldSelect extends FieldType {
49
73
  }
50
74
  </ion-select>
51
75
  }
52
- `, isInline: true, styles: [":host{display:inherit}\n"], dependencies: [{ 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: "component", type: i2.IonSelect, selector: "ion-select", inputs: ["cancelText", "color", "compareWith", "disabled", "errorText", "expandedIcon", "fill", "helperText", "interface", "interfaceOptions", "justify", "label", "labelPlacement", "mode", "multiple", "name", "okText", "placeholder", "required", "selectedText", "shape", "toggleIcon", "value"] }, { kind: "component", type: i2.IonSelectOption, selector: "ion-select-option", inputs: ["disabled", "value"] }, { kind: "directive", type: i2.SelectValueAccessor, selector: "ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "directive", type: i3.ɵIonFormlyAttributes, selector: "[ionFormlyAttributes]", inputs: ["ionFormlyAttributes"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
53
- }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldSelect, decorators: [{
55
- type: Component,
56
- args: [{ selector: 'formly-field-ion-select', template: `
76
+ `,
77
+ isInline: true,
78
+ styles: [":host{display:inherit}\n"],
79
+ dependencies: [
80
+ {
81
+ kind: "directive",
82
+ type: i1$1.NgControlStatus,
83
+ selector: "[formControlName],[ngModel],[formControl]"
84
+ },
85
+ {
86
+ kind: "directive",
87
+ type: i1$1.FormControlDirective,
88
+ selector: "[formControl]",
89
+ inputs: [
90
+ "formControl",
91
+ "disabled",
92
+ "ngModel"
93
+ ],
94
+ outputs: ["ngModelChange"],
95
+ exportAs: ["ngForm"]
96
+ },
97
+ {
98
+ kind: "component",
99
+ type: i2.IonSelect,
100
+ selector: "ion-select",
101
+ inputs: [
102
+ "cancelText",
103
+ "color",
104
+ "compareWith",
105
+ "disabled",
106
+ "errorText",
107
+ "expandedIcon",
108
+ "fill",
109
+ "helperText",
110
+ "interface",
111
+ "interfaceOptions",
112
+ "justify",
113
+ "label",
114
+ "labelPlacement",
115
+ "mode",
116
+ "multiple",
117
+ "name",
118
+ "okText",
119
+ "placeholder",
120
+ "selectedText",
121
+ "shape",
122
+ "toggleIcon",
123
+ "value"
124
+ ]
125
+ },
126
+ {
127
+ kind: "component",
128
+ type: i2.IonSelectOption,
129
+ selector: "ion-select-option",
130
+ inputs: [
131
+ "description",
132
+ "disabled",
133
+ "justify",
134
+ "labelPlacement",
135
+ "mode",
136
+ "value"
137
+ ]
138
+ },
139
+ {
140
+ kind: "directive",
141
+ type: i3.ɵIonFormlyAttributes,
142
+ selector: "[ionFormlyAttributes]",
143
+ inputs: ["ionFormlyAttributes"]
144
+ },
145
+ {
146
+ kind: "pipe",
147
+ type: i4.AsyncPipe,
148
+ name: "async"
149
+ },
150
+ {
151
+ kind: "pipe",
152
+ type: i5.LegacyFormlySelectOptionsPipe,
153
+ name: "formlySelectOptions"
154
+ }
155
+ ],
156
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
157
+ });
158
+ }
159
+ };
160
+ i0.ɵɵngDeclareClassMetadata({
161
+ minVersion: "12.0.0",
162
+ version: "22.2.2",
163
+ ngImport: i0,
164
+ type: FormlyFieldSelect,
165
+ decorators: [{
166
+ type: Component,
167
+ args: [{
168
+ selector: "formly-field-ion-select",
169
+ template: `
57
170
  <!-- ng-container used as a workaround for https://github.com/ionic-team/ionic/issues/19324 -->
58
171
  @if (props.options | formlySelectOptions: field | async; as selectOptions) {
59
172
  <ion-select
@@ -64,12 +177,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
64
177
  [ionFormlyAttributes]="field"
65
178
  [multiple]="props.multiple"
66
179
  [interface]="props.interface"
67
- [interfaceOptions]="props.interfaceOptions"
68
- [okText]="props.okText"
69
- [cancelText]="props.cancelText"
70
- [label]="props.label"
180
+ [interfaceOptions]="props.interfaceOptions ?? {}"
181
+ [okText]="props.okText ?? 'OK'"
182
+ [cancelText]="props.cancelText ?? 'Cancel'"
183
+ [label]="props.allowHtml ? undefined : props.label"
71
184
  [labelPlacement]="props.labelPosition ?? 'start'"
72
185
  >
186
+ @if (props.allowHtml && props.label) {
187
+ <span
188
+ slot="label"
189
+ [innerHTML]="props.label"
190
+ (click)="onLabelInteraction($event)"
191
+ (keydown)="onLabelInteraction($event)"
192
+ ></span>
193
+ }
73
194
  @for (option of selectOptions; track option) {
74
195
  <ion-select-option [value]="option.value" [disabled]="option.disabled">
75
196
  {{ option.label }}
@@ -77,55 +198,91 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
77
198
  }
78
199
  </ion-select>
79
200
  }
80
- `, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [":host{display:inherit}\n"] }]
81
- }] });
82
-
201
+ `,
202
+ changeDetection: ChangeDetectionStrategy.OnPush,
203
+ standalone: false,
204
+ styles: [":host{display:inherit}\n"]
205
+ }]
206
+ }]
207
+ });
83
208
  function withFormlyFieldSelect() {
84
- return {
85
- types: [
86
- {
87
- name: 'select',
88
- component: FormlyFieldSelect,
89
- wrappers: ['form-field'],
90
- },
91
- { name: 'enum', extends: 'select' },
92
- ],
93
- };
209
+ return { types: [{
210
+ name: "select",
211
+ component: FormlyFieldSelect,
212
+ wrappers: ["form-field"]
213
+ }, {
214
+ name: "enum",
215
+ extends: "select"
216
+ }] };
94
217
  }
95
-
96
- class FormlySelectModule {
97
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
98
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
99
- ReactiveFormsModule,
100
- IonicModule,
101
- FormlyFormFieldModule,
102
- FormlySelectModule$1, i1$1.FormlyModule] }); }
103
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, imports: [CommonModule,
104
- ReactiveFormsModule,
105
- IonicModule,
106
- FormlyFormFieldModule,
107
- FormlySelectModule$1,
108
- FormlyModule.forChild(withFormlyFieldSelect())] }); }
109
- }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, decorators: [{
111
- type: NgModule,
112
- args: [{
113
- declarations: [FormlyFieldSelect],
114
- imports: [
115
- CommonModule,
116
- ReactiveFormsModule,
117
- IonicModule,
118
- FormlyFormFieldModule,
119
- FormlySelectModule$1,
120
- FormlyModule.forChild(withFormlyFieldSelect()),
121
- ],
122
- schemas: [NO_ERRORS_SCHEMA],
123
- }]
124
- }] });
125
-
126
- /**
127
- * Generated bundle index. Do not edit.
128
- */
129
-
218
+ var FormlySelectModule = class FormlySelectModule {
219
+ static {
220
+ this.ɵfac = i0.ɵɵngDeclareFactory({
221
+ minVersion: "12.0.0",
222
+ version: "22.2.2",
223
+ ngImport: i0,
224
+ type: FormlySelectModule,
225
+ deps: [],
226
+ target: i0.ɵɵFactoryTarget.NgModule
227
+ });
228
+ }
229
+ static {
230
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
231
+ minVersion: "14.0.0",
232
+ version: "22.2.2",
233
+ ngImport: i0,
234
+ type: FormlySelectModule,
235
+ declarations: [FormlyFieldSelect],
236
+ imports: [
237
+ CommonModule,
238
+ ReactiveFormsModule,
239
+ IonSelect,
240
+ IonSelectOption,
241
+ FormlyFormFieldModule,
242
+ FormlySelectModule$1,
243
+ i1.FormlyModule
244
+ ]
245
+ });
246
+ }
247
+ static {
248
+ this.ɵinj = i0.ɵɵngDeclareInjector({
249
+ minVersion: "12.0.0",
250
+ version: "22.2.2",
251
+ ngImport: i0,
252
+ type: FormlySelectModule,
253
+ imports: [
254
+ CommonModule,
255
+ ReactiveFormsModule,
256
+ IonSelect,
257
+ IonSelectOption,
258
+ FormlyFormFieldModule,
259
+ FormlySelectModule$1,
260
+ FormlyModule.forChild(withFormlyFieldSelect())
261
+ ]
262
+ });
263
+ }
264
+ };
265
+ i0.ɵɵngDeclareClassMetadata({
266
+ minVersion: "12.0.0",
267
+ version: "22.2.2",
268
+ ngImport: i0,
269
+ type: FormlySelectModule,
270
+ decorators: [{
271
+ type: NgModule,
272
+ args: [{
273
+ declarations: [FormlyFieldSelect],
274
+ imports: [
275
+ CommonModule,
276
+ ReactiveFormsModule,
277
+ IonSelect,
278
+ IonSelectOption,
279
+ FormlyFormFieldModule,
280
+ FormlySelectModule$1,
281
+ FormlyModule.forChild(withFormlyFieldSelect())
282
+ ]
283
+ }]
284
+ }]
285
+ });
130
286
  export { FormlyFieldSelect, FormlySelectModule, withFormlyFieldSelect };
131
- //# sourceMappingURL=ngx-formly-ionic-select.mjs.map
287
+
288
+ //# sourceMappingURL=ngx-formly-ionic-select.mjs.map
@@ -1 +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.config.ts","../../../../src/ui/ionic/select/src/select.module.ts","../../../../src/ui/ionic/select/src/ngx-formly-ionic-select.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Type } from '@angular/core';\n\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport { FormlyFieldProps } from '@ngx-formly/ionic/form-field';\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 /** Options passed to the Ionic alert, action sheet, or popover interface. */\n interfaceOptions?: any;\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 @if (props.options | formlySelectOptions: field | async; as 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 [interfaceOptions]=\"props.interfaceOptions\"\n [okText]=\"props.okText\"\n [cancelText]=\"props.cancelText\"\n [label]=\"props.label\"\n [labelPlacement]=\"props.labelPosition ?? 'start'\"\n >\n @for (option of selectOptions; track option) {\n <ion-select-option [value]=\"option.value\" [disabled]=\"option.disabled\">\n {{ option.label }}\n </ion-select-option>\n }\n </ion-select>\n }\n `,\n styles: [':host { display: inherit; }'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\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 { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldSelect } from './select.type';\n\nexport function withFormlyFieldSelect(): ConfigOption {\n return {\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\n };\n}\n","import { NO_ERRORS_SCHEMA, 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';\nimport { withFormlyFieldSelect } from './select.config';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonicModule,\n\n FormlyFormFieldModule,\n FormlyCoreSelectModule,\n FormlyModule.forChild(withFormlyFieldSelect()),\n ],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class FormlySelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FormlyCoreSelectModule","i1"],"mappings":";;;;;;;;;;;;;;;AAmDM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;AA/B9E,IAAA,WAAA,GAAA;;AAgCW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE;gBAClB,CAAC;AACF,aAAA;SACF;AACF,IAAA;+GARY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAA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,EAAAC,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAKb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAV3B,YAAY;YACZ,mBAAmB;YACnB,WAAW;YAEX,qBAAqB;YACrBD,oBAAsB;AACtB,YAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAIrC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,WAAW;wBAEX,qBAAqB;wBACrBA,oBAAsB;AACtB,wBAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AAC/C,qBAAA;oBACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,iBAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-ionic-select.mjs","names":[],"sources":["../../../../src/ui/ionic/select/src/select.type.ts","../../../../src/ui/ionic/select/src/select.config.ts","../../../../src/ui/ionic/select/src/select.module.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Type } from '@angular/core';\n\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport { FormlyFieldProps } from '@ngx-formly/ionic/form-field';\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 /** Options passed to the Ionic alert, action sheet, or popover interface. */\n interfaceOptions?: any;\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 @if (props.options | formlySelectOptions: field | async; as 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 [interfaceOptions]=\"props.interfaceOptions ?? {}\"\n [okText]=\"props.okText ?? 'OK'\"\n [cancelText]=\"props.cancelText ?? 'Cancel'\"\n [label]=\"props.allowHtml ? undefined : props.label\"\n [labelPlacement]=\"props.labelPosition ?? 'start'\"\n >\n @if (props.allowHtml && props.label) {\n <span\n slot=\"label\"\n [innerHTML]=\"props.label\"\n (click)=\"onLabelInteraction($event)\"\n (keydown)=\"onLabelInteraction($event)\"\n ></span>\n }\n @for (option of selectOptions; track option) {\n <ion-select-option [value]=\"option.value\" [disabled]=\"option.disabled\">\n {{ option.label }}\n </ion-select-option>\n }\n </ion-select>\n }\n `,\n styles: [':host { display: inherit; }'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\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 protected onLabelInteraction(event: Event) {\n if ((event.target as HTMLElement).closest('a[href]')) {\n event.stopPropagation();\n }\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldSelect } from './select.type';\n\nexport function withFormlyFieldSelect(): ConfigOption {\n return {\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\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 { IonSelect, IonSelectOption } 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';\nimport { withFormlyFieldSelect } from './select.config';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonSelect,\n IonSelectOption,\n\n FormlyFormFieldModule,\n FormlyCoreSelectModule,\n FormlyModule.forChild(withFormlyFieldSelect()),\n ],\n})\nexport class FormlySelectModule {}\n"],"mappings":";;;;;;;;;;;;;;AA2DA,IAAa,oBAAb,MAAa,0BAA0B,UAAuC;CAvC9E,cAAA;;EAwCW,KAAA,iBAAiB,EACxB,OAAO,EACL,YAAY,IAAS,IAAO;GAC1B,OAAO,OAAO;EAChB,EACD,EACF;CAOF;CALW,mBAAmB,OAAY;EACvC,IAAK,MAAM,OAAuB,QAAQ,SAAS,GACjD,MAAM,gBAAe;CAEzB;CAbW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAjB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAiB,cAAA;GAAA,UAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UArClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCT,UAAA;GAAA,QAAA,CAAA,0BAAA;GAAA,cAAA;IAAA;KAAA,MAAA;KAAA,MAAA,KAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA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