@ngx-formly/ionic 10.0.1 → 11.0.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
package/README.md CHANGED
@@ -1,180 +1,112 @@
1
- <div align="center">
2
- <a href="https://formly.dev">
3
- <img width="200" src="https://raw.githubusercontent.com/ngx-formly/ngx-formly/v5/logo.svg?sanitize=true" />
4
- </a>
5
- <br />
6
- JSON powered / Dynamic forms in Angular
7
- <br /><br />
8
-
9
- [![Npm version](https://badge.fury.io/js/%40ngx-formly%2Fcore.svg)](https://npmjs.org/package/@ngx-formly/core)
10
- [![Downloads](https://img.shields.io/npm/dm/@ngx-formly/core.svg)](https://npmjs.org/package/@ngx-formly/core)
11
- [![Gitter](https://badges.gitter.im/formly-js/ng2-formly.svg)](https://gitter.im/formly-js/ng2-formly)
12
- [![Build Status](https://github.com/ngx-formly/ngx-formly/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ngx-formly/ngx-formly/actions/workflows/ci.yml/badge.svg?branch=main)
13
- [![Twitter](https://img.shields.io/badge/twitter-@formlydev-blue.svg)](https://twitter.com/formlydev)
14
- [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ngx-formly/ngx-formly)
15
- </div>
16
-
17
- ---
18
-
19
- Formly is a dynamic (JSON powered) form library for Angular that brings unmatched maintainability to your application's forms.
20
-
21
- ## Features
22
-
23
- - 🔥 Automatic forms generation
24
- - 📝 Easy to extend with custom field types, validation, wrappers and extensions.
25
- - ⚡️ Supports multiple schemas:
26
- - Formly Schema (core)
27
- - JSON Schema
28
- - JSON Schema string defaults are configurable. See [schema defaults](docs/json-schema.md#defaults).
29
- - 😍 A bunch of themes, out of the box!
30
- - 💪 Built on top of [Angular Reactive Forms](https://angular.dev/guide/forms/reactive-forms)
31
- - Nullable JSON Schema numbers preserve `null` when cleared. See [JSON Schema](docs/json-schema.md#nullable-numbers).
32
- - Forms emit their initial validation status after building, including valid forms. See [form notifications](docs/properties-options.md#initial-validation-status).
33
- - Subscribe to controls after fields load with the `fieldChange` output. See [form build notifications](docs/properties-options.md#accessing-controls-after-a-build).
34
- - 📹 [@eggheadio course](https://egghead.io/playlists/configuration-based-reactive-angular-forms-with-ngx-formly-465f) - 20 lessons & 78 minutes
35
-
36
- ## Docs
37
-
38
- Try the live configuration-to-form example on [formly.dev](https://formly.dev), then explore the guides and UI demos.
39
- Use the search button or Cmd/Ctrl+K to search guide and migration text, plus UI and example page names.
40
-
41
- - [Get Started](https://formly.dev/guide)
42
- - [CSP-safe expressions and optional chaining](docs/expression-properties.md#4-expression-evaluation)
43
- - [Themes](https://formly.dev/ui)
44
- - [Ionic select interface options](docs/properties-options.md#ionic-select-interfaces)
45
- - [Examples](https://formly.dev/examples)
46
-
47
- ## Resources
48
-
49
- - [How to auto-generate advanced forms using Formly](https://symflower.com/en/company/blog/2022/how-to-auto-generate-forms-with-formly)
50
- - [Build Fast, JSON-Powered Forms on Angular With Ngx Formly](https://medium.com/better-programming/build-fast-json-powered-forms-on-angular-with-ngx-formly-b7a00733e66e?source=friends_link&sk=34fc6bdc71dd15fd255af18fb3280763)
51
- - [How to Build Fast, Advanced JSON-Powered Forms on Angular With ngx-formly](https://medium.com/better-programming/how-to-build-fast-advanced-json-powered-forms-on-angular-with-ngx-formly-77aeed406f73?source=friends_link&sk=8d4f332458a46557778a3438e8f63581)
52
-
53
- #### **Supported UI libs**
54
-
55
- | UI | | |
56
- | ------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
57
- | [Bootstrap](https://getbootstrap.com) | [Demo](https://formly.dev/ui/bootstrap) | [StackBlitz](https://stackblitz.com/edit/ngx-formly-ui-bootstrap) |
58
- | [Material2](https://github.com/angular/material2) | [Demo](https://formly.dev/ui/material) | [StackBlitz](https://stackblitz.com/edit/ngx-formly-ui-material) |
59
- | [Ionic](https://ionicframework.com) | [Demo](https://formly.dev/ui/ionic) | [StackBlitz](https://stackblitz.com/edit/ngx-formly-ui-ionic) |
60
- | [PrimeNG](http://primefaces.org/primeng/#/) | [Demo](https://formly.dev/ui/primeng) | [StackBlitz](https://stackblitz.com/edit/ngx-formly-ui-primeng) |
61
- | [Kendo](http://www.telerik.com/kendo-angular-ui) | [Demo](https://formly.dev/ui/kendo) | [StackBlitz](https://stackblitz.com/edit/ngx-formly-ui-kendo) |
62
- | [NG-ZORRO](http://ng.ant.design) | [Demo](https://formly.dev/ui/ng-zorro-antd) | [StackBlitz](https://stackblitz.com/edit/ngx-formly-ui-ng-zorro-antd) |
63
- | [NativeScript](https://www.nativescript.org) | ||
64
-
65
- #### **Which Version to use?**
1
+ # @ngx-formly/ionic
2
+
3
+ Ionic field types and wrappers for Formly. This adapter uses Ionic standalone controls such as `ion-input`, `ion-select`, and `ion-checkbox` with Angular Reactive Forms.
4
+
5
+ ## Installation
6
+
7
+ For Formly 11, use Angular 22 or newer and Ionic 9. Keep all `@ngx-formly/*` packages on the same version, and use an `@angular/forms` version matching your application.
8
+
9
+ In an Angular application with Reactive Forms installed:
10
+
11
+ ```sh
12
+ npm install @ngx-formly/core@^11 @ngx-formly/ionic@^11 @ionic/angular@^9
13
+ ```
14
+
15
+ Use this adapter in an Ionic Angular application with its global Ionic styles configured. For an existing Angular application, follow the [Ionic Angular setup guide](https://ionicframework.com/docs/angular/overview). Initialize Ionic with `provideIonicAngular()` as shown below.
16
+
17
+ ## Configuration
18
+
19
+ Add the adapter to your application providers in `app.config.ts`:
20
+
21
+ ```ts
22
+ import { ApplicationConfig } from '@angular/core';
23
+ import { provideIonicAngular } from '@ionic/angular';
24
+ import { provideFormlyCore } from '@ngx-formly/core';
25
+ import { withFormlyIonic } from '@ngx-formly/ionic';
26
+
27
+ export const appConfig: ApplicationConfig = {
28
+ providers: [provideIonicAngular(), provideFormlyCore(withFormlyIonic())],
29
+ };
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ This field renders an email input using Ionic:
35
+
36
+ ```ts
37
+ import { Component } from '@angular/core';
38
+ import { FormGroup, ReactiveFormsModule } from '@angular/forms';
39
+ import { FormlyFieldConfig, FormlyForm } from '@ngx-formly/core';
40
+
41
+ @Component({
42
+ selector: 'app-example',
43
+ imports: [ReactiveFormsModule, FormlyForm],
44
+ template: `
45
+ <form [formGroup]="form">
46
+ <formly-form [form]="form" [fields]="fields" [model]="model"></formly-form>
47
+ </form>
48
+ `,
49
+ })
50
+ export class ExampleComponent {
51
+ form = new FormGroup({});
52
+ model = { email: '' };
53
+ fields: FormlyFieldConfig[] = [
54
+ {
55
+ key: 'email',
56
+ type: 'input',
57
+ props: { type: 'email', label: 'Email', required: true },
58
+ },
59
+ ];
60
+ }
61
+ ```
62
+
63
+ ## Field types
64
+
65
+ `withFormlyIonic()` registers `input`, `textarea`, `checkbox`, `radio`, and `select`, together with their form-field wrapper.
66
+
67
+ Register these additional controls separately:
68
+
69
+ | Field type | Import | Registration |
70
+ | ----------------- | ---------------------------- | --------------------------- |
71
+ | `datetime` | `@ngx-formly/ionic/datetime` | `withFormlyFieldDatetime()` |
72
+ | `slider`, `range` | `@ngx-formly/ionic/slider` | `withFormlyFieldSlider()` |
73
+ | `toggle` | `@ngx-formly/ionic/toggle` | `withFormlyFieldToggle()` |
74
+
75
+ For example, add `withFormlyFieldToggle()` alongside the default types:
76
+
77
+ ```ts
78
+ import { ApplicationConfig } from '@angular/core';
79
+ import { provideIonicAngular } from '@ionic/angular';
80
+ import { provideFormlyCore } from '@ngx-formly/core';
81
+ import { withFormlyIonic } from '@ngx-formly/ionic';
82
+ import { withFormlyFieldToggle } from '@ngx-formly/ionic/toggle';
83
+
84
+ export const appConfig: ApplicationConfig = {
85
+ providers: [provideIonicAngular(), provideFormlyCore([...withFormlyIonic(), withFormlyFieldToggle()])],
86
+ };
87
+ ```
88
+
89
+ Use `props.interface` and `props.interfaceOptions` to configure Ionic select overlays. See [select interfaces](https://github.com/ngx-formly/ngx-formly/blob/main/docs/properties-options.md#ionic-select-interfaces).
90
+
91
+ ## Which Version to use?
92
+
93
+ Match `@ngx-formly/ionic` to your `@ngx-formly/core` version, and check the migration guide for UI library requirements.
66
94
 
67
95
  | Angular version | Formly version | Migration |
68
96
  | --------------- | -------------------- | ---------------------------------- |
69
- | Angular >= 21 | `@ngx-formly/core@10.x` | [Upgrade to v10](UPGRADE-10.0.md) |
70
- | Angular >= 20 | `@ngx-formly/core@9.x` | [Upgrade to v9](UPGRADE-9.0.md) |
71
- | Angular >= 19 | `@ngx-formly/core@8.x` | [Upgrade to v8](UPGRADE-8.0.md) |
72
- | Angular >= 18 | `@ngx-formly/core@7.x` | [Upgrade to v7](UPGRADE-7.0.md) |
73
- | Angular >= 13 | `@ngx-formly/core@6.x` | [Upgrade to v6](UPGRADE-6.0.md) |
74
- | Angular >= 7 | `@ngx-formly/core@5.x` | [Upgrade to v5](UPGRADE-5.0.md) |
75
- | Angular >= 6 | `@ngx-formly/core@4.x` | |
76
- | Angular >= 5 | `@ngx-formly/core@3.x` | |
77
- | Angular >= 4 | `@ngx-formly/core@2.x` | [Upgrade to v2](UPGRADE-2.0.md) |
78
- | Angular >= 2 | `ng-formly@1.x` | |
79
-
80
- #### Upgrading to v10
81
-
82
- Formly v10 requires Angular 21 or newer. Upgrade Angular first, then update all
83
- `@ngx-formly/*` packages used by your application together to v10.
84
- The Material, PrimeNG, and NG-ZORRO integrations require version 21 or newer of
85
- their respective UI libraries. Kendo requires version 21.4.1 or newer, and NativeScript
86
- requires `@nativescript/angular` 21 or newer. Applications staying on Angular 20 should use Formly v9.
87
-
88
- See the [v10 upgrade guide](UPGRADE-10.0.md) for migration steps.
89
-
90
- #### Upgrading to v9
91
-
92
- Formly v9 requires Angular 20 or newer. Upgrade Angular first, then update all
93
- `@ngx-formly/*` packages used by your application together to v9.
94
- The Material, PrimeNG, and NG-ZORRO integrations require version 20 or newer of
95
- their respective UI libraries. Kendo requires version 19.1 or newer, and NativeScript
96
- requires `@nativescript/angular` 20 or newer. Applications staying on Angular 19 should
97
- use Formly v8; applications staying on Angular 18 should use Formly v7.
98
-
99
- PrimeNG datepicker fields no longer accept `monthNavigator`, `yearNavigator`, or
100
- `yearRange`, which PrimeNG 20 removed. Replace `@primeng/themes` imports with
101
- `@primeuix/themes` when configuring a PrimeNG theme.
102
-
103
- See the [v9 upgrade guide](UPGRADE-9.0.md) for migration steps and the [changelog](CHANGELOG.md) for the full list of changes.
104
-
105
- ## Core Team
106
-
107
- <table>
108
- <tr>
109
- <td align="center">
110
- <a href="https://github.com/aitboudad">
111
- <img src="https://avatars.githubusercontent.com/u/1753742?v=3" width="100px;" />
112
- <br />
113
- <sub><b>Abdellatif Ait boudad</b></sub>
114
- </a>
115
- </td>
116
- <td align="center">
117
- <a href="https://juri.dev">
118
- <img src="https://avatars.githubusercontent.com/u/542458" width="100px;" />
119
- <br />
120
- <sub><b>Juri Strumpflohner</b></sub>
121
- </a>
122
- </td>
123
- <td align="center">
124
- <a href="https://github.com/mohammedzamakhan">
125
- <img src="https://avatars.githubusercontent.com/u/2327532" width="100px;" />
126
- <br />
127
- <sub><b>Mohammed Zama Khan</b></sub>
128
- </a>
129
- </td>
130
- <td align="center">
131
- <a href="https://github.com/beeman">
132
- <img src="https://avatars.githubusercontent.com/u/36491" width="100px;" />
133
- <br />
134
- <sub><b>Bram Borggreve</b></sub>
135
- </a>
136
- </td>
137
- <td align="center">
138
- <a href="https://github.com/kenisteward">
139
- <img src="https://avatars.githubusercontent.com/u/12831669" width="100px;" />
140
- <br />
141
- <sub><b>Keni Steward</b></sub>
142
- </a>
143
- </td>
144
- <td align="center">
145
- <a href="https://github.com/MaxKless">
146
- <img src="https://avatars.githubusercontent.com/u/34165455" width="100px;" />
147
- <br />
148
- <sub><b>Max Kless</b></sub>
149
- </a>
150
- </td>
151
- </tr>
152
- </table>
153
-
154
- ## Contributors
155
-
156
- Thanks goes to these wonderful people:
157
-
158
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
159
- [<img alt="aitboudad" src="https://avatars.githubusercontent.com/u/1753742?v=4&s=80" width="80"/>](https://github.com/aitboudad)[<img alt="mohammedzamakhan" src="https://avatars.githubusercontent.com/u/2327532?v=4&s=80" width="80"/>](https://github.com/mohammedzamakhan)[<img alt="divyakumarjain" src="https://avatars.githubusercontent.com/u/2039134?v=4&s=80" width="80"/>](https://github.com/divyakumarjain)[<img alt="MaxKless" src="https://avatars.githubusercontent.com/u/34165455?v=4&s=80" width="80"/>](https://github.com/MaxKless)[<img alt="couzic" src="https://avatars.githubusercontent.com/u/1380322?v=4&s=80" width="80"/>](https://github.com/couzic)[<img alt="juristr" src="https://avatars.githubusercontent.com/u/542458?v=4&s=80" width="80"/>](https://github.com/juristr)[<img alt="franzeal" src="https://avatars.githubusercontent.com/u/7455769?v=4&s=80" width="80"/>](https://github.com/franzeal)[<img alt="beeman" src="https://avatars.githubusercontent.com/u/36491?v=4&s=80" width="80"/>](https://github.com/beeman)
160
-
161
- [<img alt="kenisteward" src="https://avatars.githubusercontent.com/u/12831669?v=4&s=80" width="80"/>](https://github.com/kenisteward)[<img alt="thorgod" src="https://avatars.githubusercontent.com/u/13910170?v=4&s=80" width="80"/>](https://github.com/thorgod)[<img alt="samtsai" src="https://avatars.githubusercontent.com/u/225526?v=4&s=80" width="80"/>](https://github.com/samtsai)[<img alt="luizfbicalho" src="https://avatars.githubusercontent.com/u/16882855?v=4&s=80" width="80"/>](https://github.com/luizfbicalho)[<img alt="klemenoslaj" src="https://avatars.githubusercontent.com/u/7548247?v=4&s=80" width="80"/>](https://github.com/klemenoslaj)[<img alt="FritzHerbers" src="https://avatars.githubusercontent.com/u/10029682?v=4&s=80" width="80"/>](https://github.com/FritzHerbers)[<img alt="dev-kanishk" src="https://avatars.githubusercontent.com/u/48204976?v=4&s=80" width="80"/>](https://github.com/dev-kanishk)[<img alt="vstiebe" src="https://avatars.githubusercontent.com/u/13326475?v=4&s=80" width="80"/>](https://github.com/vstiebe)
162
-
163
- [<img alt="rpw1" src="https://avatars.githubusercontent.com/u/47835461?v=4&s=80" width="80"/>](https://github.com/rpw1)[<img alt="Devqon" src="https://avatars.githubusercontent.com/u/9316480?v=4&s=80" width="80"/>](https://github.com/Devqon)[<img alt="ryanjerskine" src="https://avatars.githubusercontent.com/u/5464778?v=4&s=80" width="80"/>](https://github.com/ryanjerskine)[<img alt="rehleinBo" src="https://avatars.githubusercontent.com/u/7338819?v=4&s=80" width="80"/>](https://github.com/rehleinBo)[<img alt="MarcosEllys" src="https://avatars.githubusercontent.com/u/6751242?v=4&s=80" width="80"/>](https://github.com/MarcosEllys)[<img alt="manuelmeister" src="https://avatars.githubusercontent.com/u/3001985?v=4&s=80" width="80"/>](https://github.com/manuelmeister)[<img alt="dolphinigle" src="https://avatars.githubusercontent.com/u/7020472?v=4&s=80" width="80"/>](https://github.com/dolphinigle)[<img alt="Lehoczky" src="https://avatars.githubusercontent.com/u/31937175?v=4&s=80" width="80"/>](https://github.com/Lehoczky)
164
-
165
- [<img alt="Krustie101" src="https://avatars.githubusercontent.com/u/1636728?v=4&s=80" width="80"/>](https://github.com/Krustie101)[<img alt="intellix" src="https://avatars.githubusercontent.com/u/1162531?v=4&s=80" width="80"/>](https://github.com/intellix)[<img alt="skrtheboss" src="https://avatars.githubusercontent.com/u/10209728?v=4&s=80" width="80"/>](https://github.com/skrtheboss)[<img alt="dwaldrum" src="https://avatars.githubusercontent.com/u/386721?v=4&s=80" width="80"/>](https://github.com/dwaldrum)[<img alt="json-derulo" src="https://avatars.githubusercontent.com/u/18580672?v=4&s=80" width="80"/>](https://github.com/json-derulo)[<img alt="atsjo" src="https://avatars.githubusercontent.com/u/16601899?v=4&s=80" width="80"/>](https://github.com/atsjo)[<img alt="Cselt" src="https://avatars.githubusercontent.com/u/11027521?v=4&s=80" width="80"/>](https://github.com/Cselt)[<img alt="blowsie" src="https://avatars.githubusercontent.com/u/308572?v=4&s=80" width="80"/>](https://github.com/blowsie)
166
-
167
- [<img alt="roshan-sama" src="https://avatars.githubusercontent.com/u/31125563?v=4&s=80" width="80"/>](https://github.com/roshan-sama)[<img alt="rternavskyi" src="https://avatars.githubusercontent.com/u/26190424?v=4&s=80" width="80"/>](https://github.com/rternavskyi)[<img alt="milasevicius" src="https://avatars.githubusercontent.com/u/1790265?v=4&s=80" width="80"/>](https://github.com/milasevicius)[<img alt="13dante04" src="https://avatars.githubusercontent.com/u/25120620?v=4&s=80" width="80"/>](https://github.com/13dante04)[<img alt="Riron" src="https://avatars.githubusercontent.com/u/5145523?v=4&s=80" width="80"/>](https://github.com/Riron)[<img alt="rbalet" src="https://avatars.githubusercontent.com/u/44493964?v=4&s=80" width="80"/>](https://github.com/rbalet)[<img alt="rafaelss95" src="https://avatars.githubusercontent.com/u/11965907?v=4&s=80" width="80"/>](https://github.com/rafaelss95)[<img alt="rammba" src="https://avatars.githubusercontent.com/u/40705899?v=4&s=80" width="80"/>](https://github.com/rammba)
168
-
169
- [<img alt="Pouja" src="https://avatars.githubusercontent.com/u/2385144?v=4&s=80" width="80"/>](https://github.com/Pouja)[<img alt="OmkarJ13" src="https://avatars.githubusercontent.com/u/65808188?v=4&s=80" width="80"/>](https://github.com/OmkarJ13)[<img alt="NanFengCheong" src="https://avatars.githubusercontent.com/u/7321833?v=4&s=80" width="80"/>](https://github.com/NanFengCheong)[<img alt="Tom-V" src="https://avatars.githubusercontent.com/u/322654?v=4&s=80" width="80"/>](https://github.com/Tom-V)[<img alt="VyacheslavPritykin" src="https://avatars.githubusercontent.com/u/819457?v=4&s=80" width="80"/>](https://github.com/VyacheslavPritykin)[<img alt="akamyshanov" src="https://avatars.githubusercontent.com/u/1358330?v=4&s=80" width="80"/>](https://github.com/akamyshanov)[<img alt="danielcrisp" src="https://avatars.githubusercontent.com/u/1104814?v=4&s=80" width="80"/>](https://github.com/danielcrisp)[<img alt="francisco-sanchez-molina" src="https://avatars.githubusercontent.com/u/9049706?v=4&s=80" width="80"/>](https://github.com/francisco-sanchez-molina)
170
-
171
- [<img alt="jazpearson" src="https://avatars.githubusercontent.com/u/7648154?v=4&s=80" width="80"/>](https://github.com/jazpearson)[<img alt="kapsiR" src="https://avatars.githubusercontent.com/u/7165033?v=4&s=80" width="80"/>](https://github.com/kapsiR)[<img alt="marfer" src="https://avatars.githubusercontent.com/u/1127166?v=4&s=80" width="80"/>](https://github.com/marfer)[<img alt="mburger81" src="https://avatars.githubusercontent.com/u/3778892?v=4&s=80" width="80"/>](https://github.com/mburger81)[<img alt="n3xus" src="https://avatars.githubusercontent.com/u/510213?v=4&s=80" width="80"/>](https://github.com/n3xus)[<img alt="neminovno" src="https://avatars.githubusercontent.com/u/1468887?v=4&s=80" width="80"/>](https://github.com/neminovno)[<img alt="sesidhar01" src="https://avatars.githubusercontent.com/u/61068911?v=4&s=80" width="80"/>](https://github.com/sesidhar01)[<img alt="vezzoo" src="https://avatars.githubusercontent.com/u/28898894?v=4&s=80" width="80"/>](https://github.com/vezzoo)
172
-
173
- [<img alt="wenqi73" src="https://avatars.githubusercontent.com/u/23337087?v=4&s=80" width="80"/>](https://github.com/wenqi73)[<img alt="yoni333" src="https://avatars.githubusercontent.com/u/19931760?v=4&s=80" width="80"/>](https://github.com/yoni333)[<img alt="AlexTalcura" src="https://avatars.githubusercontent.com/u/20095773?v=4&s=80" width="80"/>](https://github.com/AlexTalcura)[<img alt="alex-novikov-1990" src="https://avatars.githubusercontent.com/u/6377930?v=4&s=80" width="80"/>](https://github.com/alex-novikov-1990)[<img alt="alvarolb" src="https://avatars.githubusercontent.com/u/1141353?v=4&s=80" width="80"/>](https://github.com/alvarolb)[<img alt="andmoredev" src="https://avatars.githubusercontent.com/u/33256364?v=4&s=80" width="80"/>](https://github.com/andmoredev)[<img alt="vitale232" src="https://avatars.githubusercontent.com/u/8504254?v=4&s=80" width="80"/>](https://github.com/vitale232)[<img alt="AmGarera" src="https://avatars.githubusercontent.com/u/6021169?v=4&s=80" width="80"/>](https://github.com/AmGarera)
174
-
175
- [<img alt="atsjo" src="https://avatars.githubusercontent.com/u/16601899?v=4&s=80" width="80"/>](https://github.com/atsjo)[<img alt="bhaidar" src="https://avatars.githubusercontent.com/u/1163421?v=4&s=80" width="80"/>](https://github.com/bhaidar)[<img alt="cyrilletuzi" src="https://avatars.githubusercontent.com/u/555867?v=4&s=80" width="80"/>](https://github.com/cyrilletuzi)[<img alt="json-derulo" src="https://avatars.githubusercontent.com/u/18580672?v=4&s=80" width="80"/>](https://github.com/json-derulo)[<img alt="Dayvisson" src="https://avatars.githubusercontent.com/u/12189515?v=4&s=80" width="80"/>](https://github.com/Dayvisson)[<img alt="dereekb" src="https://avatars.githubusercontent.com/u/3586580?v=4&s=80" width="80"/>](https://github.com/dereekb)[<img alt="eduardoRoth" src="https://avatars.githubusercontent.com/u/5419161?v=4&s=80" width="80"/>](https://github.com/eduardoRoth)[<img alt="enricouniurb" src="https://avatars.githubusercontent.com/u/38656571?v=4&s=80" width="80"/>](https://github.com/enricouniurb)
176
-
177
- [<img alt="erikvdv1" src="https://avatars.githubusercontent.com/u/2014802?v=4&s=80" width="80"/>](https://github.com/erikvdv1)[<img alt="fynnfeldpausch" src="https://avatars.githubusercontent.com/u/1246913?v=4&s=80" width="80"/>](https://github.com/fynnfeldpausch)[<img alt="jrgleason" src="https://avatars.githubusercontent.com/u/1319151?v=4&s=80" width="80"/>](https://github.com/jrgleason)[<img alt="johannesjo" src="https://avatars.githubusercontent.com/u/1456265?v=4&s=80" width="80"/>](https://github.com/johannesjo)[<img alt="johndbell" src="https://avatars.githubusercontent.com/u/1931322?v=4&s=80" width="80"/>](https://github.com/johndbell)[<img alt="jdpnielsen" src="https://avatars.githubusercontent.com/u/8746698?v=4&s=80" width="80"/>](https://github.com/jdpnielsen)[<img alt="TheMcMurder" src="https://avatars.githubusercontent.com/u/3059715?v=4&s=80" width="80"/>](https://github.com/TheMcMurder)[<img alt="LennardWesterveld" src="https://avatars.githubusercontent.com/u/1076589?v=4&s=80" width="80"/>](https://github.com/LennardWesterveld)
178
-
179
- [<img alt="logvinoleg89" src="https://avatars.githubusercontent.com/u/12018303?v=4&s=80" width="80"/>](https://github.com/logvinoleg89)[<img alt="LucasJAlba" src="https://avatars.githubusercontent.com/u/2780076?v=4&s=80" width="80"/>](https://github.com/LucasJAlba)[<img alt="lucienbertin" src="https://avatars.githubusercontent.com/u/10089239?v=4&s=80" width="80"/>](https://github.com/lucienbertin)[<img alt="luizbicalhoagl" src="https://avatars.githubusercontent.com/u/93284446?v=4&s=80" width="80"/>](https://github.com/luizbicalhoagl)[<img alt="waffle-iron" src="https://avatars.githubusercontent.com/u/6912981?v=4&s=80" width="80"/>](https://github.com/waffle-iron)[<img alt="mathijshoogland" src="https://avatars.githubusercontent.com/u/7372934?v=4&s=80" width="80"/>](https://github.com/mathijshoogland)[<img alt="mrbusche" src="https://avatars.githubusercontent.com/u/792378?v=4&s=80" width="80"/>](https://github.com/mrbusche)[<img alt="mehranmb78" src="https://avatars.githubusercontent.com/u/144687844?v=4&s=80" width="80"/>](https://github.com/mehranmb78)
180
- <!-- ALL-CONTRIBUTORS-LIST:END -->
97
+ | Angular >= 22 | `@ngx-formly/ionic@11.x` | [Upgrade to v11](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-11.0.md) |
98
+ | Angular >= 21 | `@ngx-formly/ionic@10.x` | [Upgrade to v10](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-10.0.md) |
99
+ | Angular >= 20 | `@ngx-formly/ionic@9.x` | [Upgrade to v9](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-9.0.md) |
100
+ | Angular >= 19 | `@ngx-formly/ionic@8.x` | [Upgrade to v8](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-8.0.md) |
101
+ | Angular >= 18 | `@ngx-formly/ionic@7.x` | [Upgrade to v7](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-7.0.md) |
102
+ | Angular >= 13 | `@ngx-formly/ionic@6.x` | [Upgrade to v6](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-6.0.md) |
103
+ | Angular >= 7 | `@ngx-formly/ionic@5.x` | [Upgrade to v5](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-5.0.md) |
104
+ | Angular >= 6 | `@ngx-formly/ionic@4.x` | |
105
+ | Angular >= 5 | `@ngx-formly/ionic@3.x` | |
106
+ | Angular >= 4 | `@ngx-formly/ionic@2.x` | [Upgrade to v2](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-2.0.md) |
107
+
108
+ ## Documentation
109
+
110
+ - [Ionic examples](https://formly.dev/ui/ionic)
111
+ - [Formly guide](https://formly.dev/guide)
112
+ - [Source](https://github.com/ngx-formly/ngx-formly/tree/main/src/ui/ionic)
@@ -1,77 +1,199 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, Component, 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 { CommonModule } from '@angular/common';
12
-
13
- class FormlyFieldCheckbox extends FieldType {
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: FormlyFieldCheckbox, isStandalone: false, selector: "formly-field-ion-checkbox", 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 { IonCheckbox } from "@ionic/angular";
9
+ import * as i3 from "@ngx-formly/ionic/form-field";
10
+ import { FormlyFormFieldModule } from "@ngx-formly/ionic/form-field";
11
+ import { CommonModule } from "@angular/common";
12
+ var FormlyFieldCheckbox = class FormlyFieldCheckbox extends FieldType {
13
+ onLabelInteraction(event) {
14
+ if (event.target.closest("a[href]")) event.stopPropagation();
15
+ }
16
+ static {
17
+ this.ɵfac = i0.ɵɵngDeclareFactory({
18
+ minVersion: "12.0.0",
19
+ version: "22.2.2",
20
+ ngImport: i0,
21
+ type: FormlyFieldCheckbox,
22
+ deps: null,
23
+ target: i0.ɵɵFactoryTarget.Component
24
+ });
25
+ }
26
+ static {
27
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
28
+ minVersion: "17.0.0",
29
+ version: "22.2.2",
30
+ type: FormlyFieldCheckbox,
31
+ isStandalone: false,
32
+ selector: "formly-field-ion-checkbox",
33
+ usesInheritance: true,
34
+ ngImport: i0,
35
+ template: `
16
36
  <ion-checkbox [formControl]="formControl" [ionFormlyAttributes]="field">
17
- {{ props.label }}
37
+ @if (props.allowHtml) {
38
+ <span
39
+ [innerHTML]="props.label"
40
+ (click)="onLabelInteraction($event)"
41
+ (keydown)="onLabelInteraction($event)"
42
+ ></span>
43
+ } @else {
44
+ {{ props.label }}
45
+ }
18
46
  </ion-checkbox>
19
- `, 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.IonCheckbox, selector: "ion-checkbox", inputs: ["alignment", "checked", "color", "disabled", "errorText", "helperText", "indeterminate", "justify", "labelPlacement", "mode", "name", "required", "value"] }, { kind: "directive", type: i2.BooleanValueAccessor, selector: "ion-checkbox,ion-toggle" }, { kind: "directive", type: i3.ɵIonFormlyAttributes, selector: "[ionFormlyAttributes]", inputs: ["ionFormlyAttributes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
- }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
22
- type: Component,
23
- args: [{ selector: 'formly-field-ion-checkbox', template: `
47
+ `,
48
+ isInline: true,
49
+ styles: [":host{display:inherit}\n"],
50
+ dependencies: [
51
+ {
52
+ kind: "directive",
53
+ type: i1$1.NgControlStatus,
54
+ selector: "[formControlName],[ngModel],[formControl]"
55
+ },
56
+ {
57
+ kind: "directive",
58
+ type: i1$1.FormControlDirective,
59
+ selector: "[formControl]",
60
+ inputs: [
61
+ "formControl",
62
+ "disabled",
63
+ "ngModel"
64
+ ],
65
+ outputs: ["ngModelChange"],
66
+ exportAs: ["ngForm"]
67
+ },
68
+ {
69
+ kind: "component",
70
+ type: i2.IonCheckbox,
71
+ selector: "ion-checkbox",
72
+ inputs: [
73
+ "checked",
74
+ "color",
75
+ "disabled",
76
+ "errorText",
77
+ "helperText",
78
+ "indeterminate",
79
+ "justify",
80
+ "labelPlacement",
81
+ "mode",
82
+ "name",
83
+ "value"
84
+ ]
85
+ },
86
+ {
87
+ kind: "directive",
88
+ type: i3.ɵIonFormlyAttributes,
89
+ selector: "[ionFormlyAttributes]",
90
+ inputs: ["ionFormlyAttributes"]
91
+ }
92
+ ],
93
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
94
+ });
95
+ }
96
+ };
97
+ i0.ɵɵngDeclareClassMetadata({
98
+ minVersion: "12.0.0",
99
+ version: "22.2.2",
100
+ ngImport: i0,
101
+ type: FormlyFieldCheckbox,
102
+ decorators: [{
103
+ type: Component,
104
+ args: [{
105
+ selector: "formly-field-ion-checkbox",
106
+ template: `
24
107
  <ion-checkbox [formControl]="formControl" [ionFormlyAttributes]="field">
25
- {{ props.label }}
108
+ @if (props.allowHtml) {
109
+ <span
110
+ [innerHTML]="props.label"
111
+ (click)="onLabelInteraction($event)"
112
+ (keydown)="onLabelInteraction($event)"
113
+ ></span>
114
+ } @else {
115
+ {{ props.label }}
116
+ }
26
117
  </ion-checkbox>
27
- `, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [":host{display:inherit}\n"] }]
28
- }] });
29
-
118
+ `,
119
+ changeDetection: ChangeDetectionStrategy.OnPush,
120
+ standalone: false,
121
+ styles: [":host{display:inherit}\n"]
122
+ }]
123
+ }]
124
+ });
30
125
  function withFormlyFieldCheckbox() {
31
- return {
32
- types: [
33
- {
34
- name: 'checkbox',
35
- component: FormlyFieldCheckbox,
36
- wrappers: ['form-field'],
37
- },
38
- {
39
- name: 'boolean',
40
- extends: 'checkbox',
41
- },
42
- ],
43
- };
44
- }
45
-
46
- class FormlyCheckboxModule {
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
48
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
49
- ReactiveFormsModule,
50
- IonicModule,
51
- FormlyFormFieldModule, i1$1.FormlyModule] }); }
52
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, imports: [CommonModule,
53
- ReactiveFormsModule,
54
- IonicModule,
55
- FormlyFormFieldModule,
56
- FormlyModule.forChild(withFormlyFieldCheckbox())] }); }
126
+ return { types: [{
127
+ name: "checkbox",
128
+ component: FormlyFieldCheckbox,
129
+ wrappers: ["form-field"]
130
+ }, {
131
+ name: "boolean",
132
+ extends: "checkbox"
133
+ }] };
57
134
  }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyCheckboxModule, decorators: [{
59
- type: NgModule,
60
- args: [{
61
- declarations: [FormlyFieldCheckbox],
62
- imports: [
63
- CommonModule,
64
- ReactiveFormsModule,
65
- IonicModule,
66
- FormlyFormFieldModule,
67
- FormlyModule.forChild(withFormlyFieldCheckbox()),
68
- ],
69
- }]
70
- }] });
71
-
72
- /**
73
- * Generated bundle index. Do not edit.
74
- */
75
-
135
+ var FormlyCheckboxModule = class FormlyCheckboxModule {
136
+ static {
137
+ this.ɵfac = i0.ɵɵngDeclareFactory({
138
+ minVersion: "12.0.0",
139
+ version: "22.2.2",
140
+ ngImport: i0,
141
+ type: FormlyCheckboxModule,
142
+ deps: [],
143
+ target: i0.ɵɵFactoryTarget.NgModule
144
+ });
145
+ }
146
+ static {
147
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
148
+ minVersion: "14.0.0",
149
+ version: "22.2.2",
150
+ ngImport: i0,
151
+ type: FormlyCheckboxModule,
152
+ declarations: [FormlyFieldCheckbox],
153
+ imports: [
154
+ CommonModule,
155
+ ReactiveFormsModule,
156
+ IonCheckbox,
157
+ FormlyFormFieldModule,
158
+ i1.FormlyModule
159
+ ]
160
+ });
161
+ }
162
+ static {
163
+ this.ɵinj = i0.ɵɵngDeclareInjector({
164
+ minVersion: "12.0.0",
165
+ version: "22.2.2",
166
+ ngImport: i0,
167
+ type: FormlyCheckboxModule,
168
+ imports: [
169
+ CommonModule,
170
+ ReactiveFormsModule,
171
+ IonCheckbox,
172
+ FormlyFormFieldModule,
173
+ FormlyModule.forChild(withFormlyFieldCheckbox())
174
+ ]
175
+ });
176
+ }
177
+ };
178
+ i0.ɵɵngDeclareClassMetadata({
179
+ minVersion: "12.0.0",
180
+ version: "22.2.2",
181
+ ngImport: i0,
182
+ type: FormlyCheckboxModule,
183
+ decorators: [{
184
+ type: NgModule,
185
+ args: [{
186
+ declarations: [FormlyFieldCheckbox],
187
+ imports: [
188
+ CommonModule,
189
+ ReactiveFormsModule,
190
+ IonCheckbox,
191
+ FormlyFormFieldModule,
192
+ FormlyModule.forChild(withFormlyFieldCheckbox())
193
+ ]
194
+ }]
195
+ }]
196
+ });
76
197
  export { FormlyCheckboxModule, FormlyFieldCheckbox, withFormlyFieldCheckbox };
77
- //# sourceMappingURL=ngx-formly-ionic-checkbox.mjs.map
198
+
199
+ //# sourceMappingURL=ngx-formly-ionic-checkbox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-ionic-checkbox.mjs","sources":["../../../../src/ui/ionic/checkbox/src/checkbox.type.ts","../../../../src/ui/ionic/checkbox/src/checkbox.config.ts","../../../../src/ui/ionic/checkbox/src/checkbox.module.ts","../../../../src/ui/ionic/checkbox/src/ngx-formly-ionic-checkbox.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 CheckboxProps extends FormlyFieldProps {}\n\nexport interface FormlyCheckboxFieldConfig extends FormlyFieldConfig<CheckboxProps> {\n type: 'checkbox' | Type<FormlyFieldCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-ion-checkbox',\n template: `\n <ion-checkbox [formControl]=\"formControl\" [ionFormlyAttributes]=\"field\">\n {{ props.label }}\n </ion-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./checkbox.type.scss'],\n standalone: false,\n})\nexport class FormlyFieldCheckbox extends FieldType<FieldTypeConfig<CheckboxProps>> {}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\nexport function withFormlyFieldCheckbox(): ConfigOption {\n return {\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\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 { FormlyFieldCheckbox } from './checkbox.type';\nimport { withFormlyFieldCheckbox } from './checkbox.config';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonicModule,\n FormlyFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckbox()),\n ],\n})\nexport class FormlyCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAqBM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;+GAArE,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EATpB;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,0BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAA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AAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAApB,oBAAoB,EAAA,YAAA,EAAA,CAThB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEhC,YAAY;YACZ,mBAAmB;YACnB,WAAW;YACX,qBAAqB,EAAAA,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIZ,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,oBAAoB,YAP7B,YAAY;YACZ,mBAAmB;YACnB,WAAW;YACX,qBAAqB;AACrB,YAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGvC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAVhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,WAAW;wBACX,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC;AACjD,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-ionic-checkbox.mjs","names":[],"sources":["../../../../src/ui/ionic/checkbox/src/checkbox.type.ts","../../../../src/ui/ionic/checkbox/src/checkbox.config.ts","../../../../src/ui/ionic/checkbox/src/checkbox.module.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 CheckboxProps extends FormlyFieldProps {}\n\nexport interface FormlyCheckboxFieldConfig extends FormlyFieldConfig<CheckboxProps> {\n type: 'checkbox' | Type<FormlyFieldCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-ion-checkbox',\n template: `\n <ion-checkbox [formControl]=\"formControl\" [ionFormlyAttributes]=\"field\">\n @if (props.allowHtml) {\n <span\n [innerHTML]=\"props.label\"\n (click)=\"onLabelInteraction($event)\"\n (keydown)=\"onLabelInteraction($event)\"\n ></span>\n } @else {\n {{ props.label }}\n }\n </ion-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./checkbox.type.scss'],\n standalone: false,\n})\nexport class FormlyFieldCheckbox extends FieldType<FieldTypeConfig<CheckboxProps>> {\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 { FormlyFieldCheckbox } from './checkbox.type';\n\nexport function withFormlyFieldCheckbox(): ConfigOption {\n return {\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\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 { IonCheckbox } from '@ionic/angular';\nimport { FormlyFormFieldModule } from '@ngx-formly/ionic/form-field';\n\nimport { FormlyFieldCheckbox } from './checkbox.type';\nimport { withFormlyFieldCheckbox } from './checkbox.config';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n IonCheckbox,\n FormlyFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckbox()),\n ],\n})\nexport class FormlyCheckboxModule {}\n"],"mappings":";;;;;;;;;;;AA6BA,IAAa,sBAAb,MAAa,4BAA4B,UAAyC;CACtE,mBAAmB,OAAY;EACvC,IAAK,MAAM,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