@ngx-formly/bootstrap 10.0.0 → 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 (29) hide show
  1. package/README.md +88 -177
  2. package/fesm2022/ngx-formly-bootstrap-addons.mjs +150 -65
  3. package/fesm2022/ngx-formly-bootstrap-addons.mjs.map +1 -1
  4. package/fesm2022/ngx-formly-bootstrap-checkbox.mjs +173 -79
  5. package/fesm2022/ngx-formly-bootstrap-checkbox.mjs.map +1 -1
  6. package/fesm2022/ngx-formly-bootstrap-form-field.mjs +204 -72
  7. package/fesm2022/ngx-formly-bootstrap-form-field.mjs.map +1 -1
  8. package/fesm2022/ngx-formly-bootstrap-input.mjs +169 -84
  9. package/fesm2022/ngx-formly-bootstrap-input.mjs.map +1 -1
  10. package/fesm2022/ngx-formly-bootstrap-multicheckbox.mjs +161 -91
  11. package/fesm2022/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -1
  12. package/fesm2022/ngx-formly-bootstrap-radio.mjs +181 -79
  13. package/fesm2022/ngx-formly-bootstrap-radio.mjs.map +1 -1
  14. package/fesm2022/ngx-formly-bootstrap-select.mjs +189 -79
  15. package/fesm2022/ngx-formly-bootstrap-select.mjs.map +1 -1
  16. package/fesm2022/ngx-formly-bootstrap-textarea.mjs +152 -71
  17. package/fesm2022/ngx-formly-bootstrap-textarea.mjs.map +1 -1
  18. package/fesm2022/ngx-formly-bootstrap.mjs +89 -66
  19. package/fesm2022/ngx-formly-bootstrap.mjs.map +1 -1
  20. package/package.json +2 -2
  21. package/types/ngx-formly-bootstrap-addons.d.ts +30 -34
  22. package/types/ngx-formly-bootstrap-checkbox.d.ts +27 -32
  23. package/types/ngx-formly-bootstrap-form-field.d.ts +26 -30
  24. package/types/ngx-formly-bootstrap-input.d.ts +21 -27
  25. package/types/ngx-formly-bootstrap-multicheckbox.d.ts +27 -32
  26. package/types/ngx-formly-bootstrap-radio.d.ts +27 -32
  27. package/types/ngx-formly-bootstrap-select.d.ts +27 -32
  28. package/types/ngx-formly-bootstrap-textarea.d.ts +26 -31
  29. package/types/ngx-formly-bootstrap.d.ts +16 -20
package/README.md CHANGED
@@ -1,180 +1,91 @@
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/bootstrap
2
+
3
+ Bootstrap 5 field types and wrappers for Formly. This adapter renders native HTML controls with Bootstrap classes and connects them to Angular Reactive Forms.
4
+
5
+ ## Installation
6
+
7
+ For Formly 11, use Angular 22 or newer and Bootstrap 5. 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/bootstrap@^11 bootstrap@^5
13
+ ```
14
+
15
+ Add `node_modules/bootstrap/dist/css/bootstrap.min.css` to the build target's `styles` array in `angular.json`. Bootstrap JavaScript is not required by these field types.
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 { provideFormlyCore } from '@ngx-formly/core';
24
+ import { withFormlyBootstrap } from '@ngx-formly/bootstrap';
25
+
26
+ export const appConfig: ApplicationConfig = {
27
+ providers: [provideFormlyCore(withFormlyBootstrap())],
28
+ };
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ This field renders an email input using Bootstrap:
34
+
35
+ ```ts
36
+ import { Component } from '@angular/core';
37
+ import { FormGroup, ReactiveFormsModule } from '@angular/forms';
38
+ import { FormlyFieldConfig, FormlyForm } from '@ngx-formly/core';
39
+
40
+ @Component({
41
+ selector: 'app-example',
42
+ imports: [ReactiveFormsModule, FormlyForm],
43
+ template: `
44
+ <form [formGroup]="form">
45
+ <formly-form [form]="form" [fields]="fields" [model]="model"></formly-form>
46
+ </form>
47
+ `,
48
+ })
49
+ export class ExampleComponent {
50
+ form = new FormGroup({});
51
+ model = { email: '' };
52
+ fields: FormlyFieldConfig[] = [
53
+ {
54
+ key: 'email',
55
+ type: 'input',
56
+ props: { type: 'email', label: 'Email', required: true },
57
+ },
58
+ ];
59
+ }
60
+ ```
61
+
62
+ ## Field types
63
+
64
+ `withFormlyBootstrap()` registers `input`, `textarea`, `checkbox`, `multicheckbox`, `radio`, and `select`, together with their form-field wrapper.
65
+
66
+ The `form-field` wrapper supplies labels, descriptions, and validation messages. The `addons` wrapper supports input prefixes and suffixes through `props.addonLeft` and `props.addonRight`.
67
+
68
+ Individual registrations are also available from entry points such as `@ngx-formly/bootstrap/input` and `@ngx-formly/bootstrap/addons`.
69
+
70
+ ## Which Version to use?
71
+
72
+ Match `@ngx-formly/bootstrap` to your `@ngx-formly/core` version, and check the migration guide for UI library requirements.
66
73
 
67
74
  | Angular version | Formly version | Migration |
68
75
  | --------------- | -------------------- | ---------------------------------- |
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 -->
76
+ | Angular >= 22 | `@ngx-formly/bootstrap@11.x` | [Upgrade to v11](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-11.0.md) |
77
+ | Angular >= 21 | `@ngx-formly/bootstrap@10.x` | [Upgrade to v10](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-10.0.md) |
78
+ | Angular >= 20 | `@ngx-formly/bootstrap@9.x` | [Upgrade to v9](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-9.0.md) |
79
+ | Angular >= 19 | `@ngx-formly/bootstrap@8.x` | [Upgrade to v8](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-8.0.md) |
80
+ | Angular >= 18 | `@ngx-formly/bootstrap@7.x` | [Upgrade to v7](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-7.0.md) |
81
+ | Angular >= 13 | `@ngx-formly/bootstrap@6.x` | [Upgrade to v6](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-6.0.md) |
82
+ | Angular >= 7 | `@ngx-formly/bootstrap@5.x` | [Upgrade to v5](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-5.0.md) |
83
+ | Angular >= 6 | `@ngx-formly/bootstrap@4.x` | |
84
+ | Angular >= 5 | `@ngx-formly/bootstrap@3.x` | |
85
+ | Angular >= 4 | `@ngx-formly/bootstrap@2.x` | [Upgrade to v2](https://github.com/ngx-formly/ngx-formly/blob/main/UPGRADE-2.0.md) |
86
+
87
+ ## Documentation
88
+
89
+ - [Bootstrap examples](https://formly.dev/ui/bootstrap)
90
+ - [Formly guide](https://formly.dev/guide)
91
+ - [Source](https://github.com/ngx-formly/ngx-formly/tree/main/src/ui/bootstrap)
@@ -1,70 +1,155 @@
1
- import * as i0 from '@angular/core';
2
- import { ViewChild, ViewEncapsulation, Component, NgModule } from '@angular/core';
3
- import * as i1$1 from '@ngx-formly/core';
4
- import { FieldWrapper, FormlyModule } from '@ngx-formly/core';
5
- import * as i1 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
- import { ReactiveFormsModule } from '@angular/forms';
8
-
9
- class FormlyWrapperAddons extends FieldWrapper {
10
- set content(templateRef) {
11
- if (templateRef && this.hostContainerRef) {
12
- this.hostContainerRef.createEmbeddedView(templateRef);
13
- }
14
- }
15
- constructor(hostContainerRef) {
16
- super();
17
- this.hostContainerRef = hostContainerRef;
18
- }
19
- addonRightClick($event) {
20
- this.props.addonRight.onClick?.(this.field, $event);
21
- }
22
- addonLeftClick($event) {
23
- this.props.addonLeft.onClick?.(this.field, $event);
24
- }
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyWrapperAddons, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
26
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyWrapperAddons, isStandalone: false, selector: "formly-wrapper-addons", viewQueries: [{ propertyName: "content", first: true, predicate: ["fieldTypeTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
27
- }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyWrapperAddons, decorators: [{
29
- type: Component,
30
- args: [{ selector: 'formly-wrapper-addons', encapsulation: ViewEncapsulation.None, standalone: false, template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"] }]
31
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { content: [{
32
- type: ViewChild,
33
- args: ['fieldTypeTemplate', { static: true }]
34
- }] } });
35
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, NgModule, ViewChild, ViewEncapsulation } from "@angular/core";
3
+ import * as i1 from "@ngx-formly/core";
4
+ import { FieldWrapper, FormlyModule } from "@ngx-formly/core";
5
+ import * as i1$1 from "@angular/common";
6
+ import { CommonModule } from "@angular/common";
7
+ import { ReactiveFormsModule } from "@angular/forms";
8
+ var FormlyWrapperAddons = class FormlyWrapperAddons extends FieldWrapper {
9
+ set content(templateRef) {
10
+ if (templateRef && this.hostContainerRef) this.hostContainerRef.createEmbeddedView(templateRef);
11
+ }
12
+ constructor(hostContainerRef) {
13
+ super();
14
+ this.hostContainerRef = hostContainerRef;
15
+ }
16
+ addonRightClick($event) {
17
+ this.props.addonRight.onClick?.(this.field, $event);
18
+ }
19
+ addonLeftClick($event) {
20
+ this.props.addonLeft.onClick?.(this.field, $event);
21
+ }
22
+ static {
23
+ this.ɵfac = i0.ɵɵngDeclareFactory({
24
+ minVersion: "12.0.0",
25
+ version: "22.2.2",
26
+ ngImport: i0,
27
+ type: FormlyWrapperAddons,
28
+ deps: [{ token: i0.ViewContainerRef }],
29
+ target: i0.ɵɵFactoryTarget.Component
30
+ });
31
+ }
32
+ static {
33
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
34
+ minVersion: "17.0.0",
35
+ version: "22.2.2",
36
+ type: FormlyWrapperAddons,
37
+ isStandalone: false,
38
+ selector: "formly-wrapper-addons",
39
+ viewQueries: [{
40
+ propertyName: "content",
41
+ first: true,
42
+ predicate: ["fieldTypeTemplate"],
43
+ descendants: true,
44
+ static: true
45
+ }],
46
+ usesInheritance: true,
47
+ ngImport: i0,
48
+ template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n",
49
+ styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"],
50
+ dependencies: [{
51
+ kind: "directive",
52
+ type: i1$1.NgClass,
53
+ selector: "[ngClass]",
54
+ inputs: ["class", "ngClass"]
55
+ }],
56
+ encapsulation: i0.ViewEncapsulation.None
57
+ });
58
+ }
59
+ };
60
+ i0.ɵɵngDeclareClassMetadata({
61
+ minVersion: "12.0.0",
62
+ version: "22.2.2",
63
+ ngImport: i0,
64
+ type: FormlyWrapperAddons,
65
+ decorators: [{
66
+ type: Component,
67
+ args: [{
68
+ selector: "formly-wrapper-addons",
69
+ encapsulation: ViewEncapsulation.None,
70
+ standalone: false,
71
+ template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n",
72
+ styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"]
73
+ }]
74
+ }],
75
+ ctorParameters: () => [{ type: i0.ViewContainerRef }],
76
+ propDecorators: { content: [{
77
+ type: ViewChild,
78
+ args: ["fieldTypeTemplate", { static: true }]
79
+ }] }
80
+ });
36
81
  function addonsExtension(field) {
37
- if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {
38
- return;
39
- }
40
- if (field.props.addonLeft || field.props.addonRight) {
41
- field.wrappers = [...(field.wrappers || []), 'addons'];
42
- }
82
+ if (!field.props || field.wrappers && field.wrappers.indexOf("addons") !== -1) return;
83
+ if (field.props.addonLeft || field.props.addonRight) field.wrappers = [...field.wrappers || [], "addons"];
43
84
  }
44
-
45
85
  function withFormlyWrapperAddons() {
46
- return {
47
- wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],
48
- extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],
49
- };
86
+ return {
87
+ wrappers: [{
88
+ name: "addons",
89
+ component: FormlyWrapperAddons
90
+ }],
91
+ extensions: [{
92
+ name: "addons",
93
+ extension: { postPopulate: addonsExtension }
94
+ }]
95
+ };
50
96
  }
51
-
52
- class FormlyBootstrapAddonsModule {
53
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
54
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, declarations: [FormlyWrapperAddons], imports: [CommonModule, ReactiveFormsModule, i1$1.FormlyModule] }); }
55
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyWrapperAddons())] }); }
56
- }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, decorators: [{
58
- type: NgModule,
59
- args: [{
60
- declarations: [FormlyWrapperAddons],
61
- imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyWrapperAddons())],
62
- }]
63
- }] });
64
-
65
- /**
66
- * Generated bundle index. Do not edit.
67
- */
68
-
97
+ var FormlyBootstrapAddonsModule = class FormlyBootstrapAddonsModule {
98
+ static {
99
+ this.ɵfac = i0.ɵɵngDeclareFactory({
100
+ minVersion: "12.0.0",
101
+ version: "22.2.2",
102
+ ngImport: i0,
103
+ type: FormlyBootstrapAddonsModule,
104
+ deps: [],
105
+ target: i0.ɵɵFactoryTarget.NgModule
106
+ });
107
+ }
108
+ static {
109
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
110
+ minVersion: "14.0.0",
111
+ version: "22.2.2",
112
+ ngImport: i0,
113
+ type: FormlyBootstrapAddonsModule,
114
+ declarations: [FormlyWrapperAddons],
115
+ imports: [
116
+ CommonModule,
117
+ ReactiveFormsModule,
118
+ i1.FormlyModule
119
+ ]
120
+ });
121
+ }
122
+ static {
123
+ this.ɵinj = i0.ɵɵngDeclareInjector({
124
+ minVersion: "12.0.0",
125
+ version: "22.2.2",
126
+ ngImport: i0,
127
+ type: FormlyBootstrapAddonsModule,
128
+ imports: [
129
+ CommonModule,
130
+ ReactiveFormsModule,
131
+ FormlyModule.forChild(withFormlyWrapperAddons())
132
+ ]
133
+ });
134
+ }
135
+ };
136
+ i0.ɵɵngDeclareClassMetadata({
137
+ minVersion: "12.0.0",
138
+ version: "22.2.2",
139
+ ngImport: i0,
140
+ type: FormlyBootstrapAddonsModule,
141
+ decorators: [{
142
+ type: NgModule,
143
+ args: [{
144
+ declarations: [FormlyWrapperAddons],
145
+ imports: [
146
+ CommonModule,
147
+ ReactiveFormsModule,
148
+ FormlyModule.forChild(withFormlyWrapperAddons())
149
+ ]
150
+ }]
151
+ }]
152
+ });
69
153
  export { FormlyBootstrapAddonsModule, withFormlyWrapperAddons };
70
- //# sourceMappingURL=ngx-formly-bootstrap-addons.mjs.map
154
+
155
+ //# sourceMappingURL=ngx-formly-bootstrap-addons.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-bootstrap-addons.mjs","sources":["../../../../src/ui/bootstrap/addons/src/addons.component.ts","../../../../src/ui/bootstrap/addons/src/addons.component.html","../../../../src/ui/bootstrap/addons/src/addon.extension.ts","../../../../src/ui/bootstrap/addons/src/addons.config.ts","../../../../src/ui/bootstrap/addons/src/addons.module.ts","../../../../src/ui/bootstrap/addons/src/ngx-formly-bootstrap-addons.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { FormlyFieldConfig, FieldTypeConfig, FieldWrapper } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface AddonsProps extends FormlyFieldProps {\n addonRight?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n addonLeft?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n}\n\n@Component({\n selector: 'formly-wrapper-addons',\n templateUrl: './addons.component.html',\n styleUrls: ['./addons.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class FormlyWrapperAddons extends FieldWrapper<FieldTypeConfig<AddonsProps>> {\n @ViewChild('fieldTypeTemplate', { static: true }) set content(templateRef: TemplateRef<any>) {\n if (templateRef && this.hostContainerRef) {\n this.hostContainerRef.createEmbeddedView(templateRef);\n }\n }\n\n constructor(private hostContainerRef?: ViewContainerRef) {\n super();\n }\n\n addonRightClick($event: any) {\n this.props.addonRight.onClick?.(this.field, $event);\n }\n\n addonLeftClick($event: any) {\n this.props.addonLeft.onClick?.(this.field, $event);\n }\n}\n","<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n","import { FormlyFieldConfig } from '@ngx-formly/core';\n\nexport function addonsExtension(field: FormlyFieldConfig) {\n if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {\n return;\n }\n\n if (field.props.addonLeft || field.props.addonRight) {\n field.wrappers = [...(field.wrappers || []), 'addons'];\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperAddons } from './addons.component';\nimport { addonsExtension } from './addon.extension';\n\nexport function withFormlyWrapperAddons(): ConfigOption {\n return {\n wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],\n extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],\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 { FormlyWrapperAddons } from './addons.component';\nimport { withFormlyWrapperAddons } from './addons.config';\n\n@NgModule({\n declarations: [FormlyWrapperAddons],\n imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyWrapperAddons())],\n})\nexport class FormlyBootstrapAddonsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;AAwBM,MAAO,mBAAoB,SAAQ,YAA0C,CAAA;IACjF,IAAsD,OAAO,CAAC,WAA6B,EAAA;AACzF,QAAA,IAAI,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACxC,YAAA,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,WAAW,CAAC;QACvD;IACF;AAEA,IAAA,WAAA,CAAoB,gBAAmC,EAAA;AACrD,QAAA,KAAK,EAAE;QADW,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;IAEpC;AAEA,IAAA,eAAe,CAAC,MAAW,EA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A,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAAC;AAC/F,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-bootstrap-addons.mjs","names":[],"sources":["../../../../src/ui/bootstrap/addons/src/addons.component.ts","../../../../src/ui/bootstrap/addons/src/addons.component.html","../../../../src/ui/bootstrap/addons/src/addon.extension.ts","../../../../src/ui/bootstrap/addons/src/addons.config.ts","../../../../src/ui/bootstrap/addons/src/addons.module.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { FormlyFieldConfig, FieldTypeConfig, FieldWrapper } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface AddonsProps extends FormlyFieldProps {\n addonRight?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n addonLeft?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n}\n\n@Component({\n selector: 'formly-wrapper-addons',\n templateUrl: './addons.component.html',\n styleUrls: ['./addons.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class FormlyWrapperAddons extends FieldWrapper<FieldTypeConfig<AddonsProps>> {\n @ViewChild('fieldTypeTemplate', { static: true }) set content(templateRef: TemplateRef<any>) {\n if (templateRef && this.hostContainerRef) {\n this.hostContainerRef.createEmbeddedView(templateRef);\n }\n }\n\n constructor(private hostContainerRef?: ViewContainerRef) {\n super();\n }\n\n addonRightClick($event: any) {\n this.props.addonRight.onClick?.(this.field, $event);\n }\n\n addonLeftClick($event: any) {\n this.props.addonLeft.onClick?.(this.field, $event);\n }\n}\n","<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n","import { FormlyFieldConfig } from '@ngx-formly/core';\n\nexport function addonsExtension(field: FormlyFieldConfig) {\n if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {\n return;\n }\n\n if (field.props.addonLeft || field.props.addonRight) {\n field.wrappers = [...(field.wrappers || []), 'addons'];\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperAddons } from './addons.component';\nimport { addonsExtension } from './addon.extension';\n\nexport function withFormlyWrapperAddons(): ConfigOption {\n return {\n wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],\n extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],\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 { FormlyWrapperAddons } from './addons.component';\nimport { withFormlyWrapperAddons } from './addons.config';\n\n@NgModule({\n declarations: [FormlyWrapperAddons],\n imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyWrapperAddons())],\n})\nexport class FormlyBootstrapAddonsModule {}\n"],"mappings":";;;;;;;AAwBA,IAAa,sBAAb,MAAa,4BAA4B,aAA0C;CACjF,IAAsD,QAAQ,aAA6B;EACzF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