@ngx-formly/bootstrap 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 (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
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-bootstrap-form-field.mjs","sources":["../../../../src/ui/bootstrap/form-field/src/form-field.wrapper.ts","../../../../src/ui/bootstrap/form-field/src/form-field.config.ts","../../../../src/ui/bootstrap/form-field/src/form-field.module.ts","../../../../src/ui/bootstrap/form-field/src/field.type.ts","../../../../src/ui/bootstrap/form-field/src/ngx-formly-bootstrap-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldWrapper, FormlyFieldConfig, FormlyFieldProps as CoreFormlyFieldProps } from '@ngx-formly/core';\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n labelPosition?: 'floating';\n}\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <ng-template #labelTemplate>\n @if (props.label && props.hideLabel !== true) {\n <label [attr.for]=\"id\" class=\"form-label\">\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </ng-template>\n\n <div [class.form-floating]=\"props.labelPosition === 'floating'\" [class.has-error]=\"showError\">\n @if (props.labelPosition !== 'floating') {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <ng-template #fieldComponent></ng-template>\n\n @if (props.labelPosition === 'floating') {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n @if (showError) {\n <div class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message\n id=\"{{ id }}-formly-validation-error\"\n [field]=\"field\"\n role=\"alert\"\n ></formly-validation-message>\n </div>\n }\n\n @if (props.description) {\n <small class=\"form-text text-muted\">{{ props.description }}</small>\n }\n </div>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n standalone: false,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> {}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\nexport function withFormlyFormField(): ConfigOption {\n return {\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\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 { FormlyWrapperFormField } from './form-field.wrapper';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyFormField())],\n})\nexport class FormlyBootstrapFormFieldModule {}\n","import { Directive, Optional, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> extends CoreFieldType<F> {\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(@Optional() private hostContainerRef?: ViewContainerRef) {\n super();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","CoreFieldType"],"mappings":";;;;;;;;AAoDM,MAAO,sBAAuB,SAAQ,YAAiD,CAAA;+GAAhF,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,KAA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,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAD9B;;0BAQc;;sBANZ,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;ACLlD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-bootstrap-form-field.mjs","names":[],"sources":["../../../../src/ui/bootstrap/form-field/src/form-field.wrapper.ts","../../../../src/ui/bootstrap/form-field/src/form-field.config.ts","../../../../src/ui/bootstrap/form-field/src/form-field.module.ts","../../../../src/ui/bootstrap/form-field/src/field.type.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldWrapper, FormlyFieldConfig, FormlyFieldProps as CoreFormlyFieldProps } from '@ngx-formly/core';\n\nexport interface FormlyFieldProps extends CoreFormlyFieldProps {\n hideLabel?: boolean;\n hideRequiredMarker?: boolean;\n labelPosition?: 'floating';\n}\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <ng-template #labelTemplate>\n @if (props.label && props.hideLabel !== true) {\n <label [attr.for]=\"id\" class=\"form-label\">\n @if (props.allowHtml) {\n <span [innerHTML]=\"props.label\"></span>\n } @else {\n {{ props.label }}\n }\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </ng-template>\n\n <div [class.form-floating]=\"props.labelPosition === 'floating'\" [class.has-error]=\"showError\">\n @if (props.labelPosition !== 'floating') {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <ng-template #fieldComponent></ng-template>\n\n @if (props.labelPosition === 'floating') {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n @if (showError) {\n <div class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message\n id=\"{{ id }}-formly-validation-error\"\n [field]=\"field\"\n role=\"alert\"\n ></formly-validation-message>\n </div>\n }\n\n @if (props.description) {\n <small class=\"form-text text-muted\">\n @if (props.allowHtml) {\n <span [innerHTML]=\"props.description\"></span>\n } @else {\n <ng-container>{{ props.description }}</ng-container>\n }\n </small>\n }\n </div>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n standalone: false,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> {}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\nexport function withFormlyFormField(): ConfigOption {\n return {\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\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 { FormlyWrapperFormField } from './form-field.wrapper';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyFormField())],\n})\nexport class FormlyBootstrapFormFieldModule {}\n","import { Directive, Optional, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> extends CoreFieldType<F> {\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(@Optional() private hostContainerRef?: ViewContainerRef) {\n super();\n }\n}\n"],"mappings":";;;;;;;AA8DA,IAAa,yBAAb,MAAa,+BAA+B,aAAiD;CAAhF;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA;GAAA,QAAA,GAAA,g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ular/core';
3
- import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
4
- import * as i1 from '@angular/forms';
5
- import { ReactiveFormsModule } from '@angular/forms';
6
- import * as i2 from '@ngx-formly/core';
7
- import { FormlyModule } from '@ngx-formly/core';
8
- import { CommonModule } from '@angular/common';
9
-
10
- class FormlyFieldInput extends FieldType {
11
- get type() {
12
- return this.props.type || 'text';
13
- }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldInput, isStandalone: false, selector: "formly-field-input", usesInheritance: true, ngImport: i0, template: `
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, NgModule } from "@angular/core";
3
+ import { FieldType, FormlyBootstrapFormFieldModule } from "@ngx-formly/bootstrap/form-field";
4
+ import * as i1 from "@angular/forms";
5
+ import { ReactiveFormsModule } from "@angular/forms";
6
+ import * as i2 from "@ngx-formly/core";
7
+ import { FormlyModule } from "@ngx-formly/core";
8
+ import { CommonModule } from "@angular/common";
9
+ var FormlyFieldInput = class FormlyFieldInput extends FieldType {
10
+ get type() {
11
+ return this.props.type || "text";
12
+ }
13
+ static {
14
+ this.ɵfac = i0.ɵɵngDeclareFactory({
15
+ minVersion: "12.0.0",
16
+ version: "22.2.2",
17
+ ngImport: i0,
18
+ type: FormlyFieldInput,
19
+ deps: null,
20
+ target: i0.ɵɵFactoryTarget.Component
21
+ });
22
+ }
23
+ static {
24
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
25
+ minVersion: "17.0.0",
26
+ version: "22.2.2",
27
+ type: FormlyFieldInput,
28
+ isStandalone: false,
29
+ selector: "formly-field-input",
30
+ usesInheritance: true,
31
+ ngImport: i0,
32
+ template: `
16
33
  <ng-template #fieldTypeTemplate>
17
34
  @if (type !== 'number') {
18
35
  <input
@@ -36,13 +53,56 @@ class FormlyFieldInput extends FieldType {
36
53
  />
37
54
  }
38
55
  </ng-template>
39
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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: "directive", type: i2.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
40
- }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldInput, decorators: [{
42
- type: Component,
43
- args: [{
44
- selector: 'formly-field-input',
45
- template: `
56
+ `,
57
+ isInline: true,
58
+ dependencies: [
59
+ {
60
+ kind: "directive",
61
+ type: i1.DefaultValueAccessor,
62
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
63
+ },
64
+ {
65
+ kind: "directive",
66
+ type: i1.NumberValueAccessor,
67
+ selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
68
+ },
69
+ {
70
+ kind: "directive",
71
+ type: i1.NgControlStatus,
72
+ selector: "[formControlName],[ngModel],[formControl]"
73
+ },
74
+ {
75
+ kind: "directive",
76
+ type: i1.FormControlDirective,
77
+ selector: "[formControl]",
78
+ inputs: [
79
+ "formControl",
80
+ "disabled",
81
+ "ngModel"
82
+ ],
83
+ outputs: ["ngModelChange"],
84
+ exportAs: ["ngForm"]
85
+ },
86
+ {
87
+ kind: "directive",
88
+ type: i2.LegacyFormlyAttributes,
89
+ selector: "[formlyAttributes]"
90
+ }
91
+ ],
92
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
93
+ });
94
+ }
95
+ };
96
+ i0.ɵɵngDeclareClassMetadata({
97
+ minVersion: "12.0.0",
98
+ version: "22.2.2",
99
+ ngImport: i0,
100
+ type: FormlyFieldInput,
101
+ decorators: [{
102
+ type: Component,
103
+ args: [{
104
+ selector: "formly-field-input",
105
+ template: `
46
106
  <ng-template #fieldTypeTemplate>
47
107
  @if (type !== 'number') {
48
108
  <input
@@ -67,68 +127,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
67
127
  }
68
128
  </ng-template>
69
129
  `,
70
- changeDetection: ChangeDetectionStrategy.OnPush,
71
- standalone: false,
72
- }]
73
- }] });
74
-
130
+ changeDetection: ChangeDetectionStrategy.OnPush,
131
+ standalone: false
132
+ }]
133
+ }]
134
+ });
75
135
  function withFormlyFieldInput() {
76
- return {
77
- types: [
78
- {
79
- name: 'input',
80
- component: FormlyFieldInput,
81
- wrappers: ['form-field'],
82
- },
83
- { name: 'string', extends: 'input' },
84
- {
85
- name: 'number',
86
- extends: 'input',
87
- defaultOptions: {
88
- props: {
89
- type: 'number',
90
- },
91
- },
92
- },
93
- {
94
- name: 'integer',
95
- extends: 'input',
96
- defaultOptions: {
97
- props: {
98
- type: 'number',
99
- },
100
- },
101
- },
102
- ],
103
- };
136
+ return { types: [
137
+ {
138
+ name: "input",
139
+ component: FormlyFieldInput,
140
+ wrappers: ["form-field"]
141
+ },
142
+ {
143
+ name: "string",
144
+ extends: "input"
145
+ },
146
+ {
147
+ name: "number",
148
+ extends: "input",
149
+ defaultOptions: { props: { type: "number" } }
150
+ },
151
+ {
152
+ name: "integer",
153
+ extends: "input",
154
+ defaultOptions: { props: { type: "number" } }
155
+ }
156
+ ] };
104
157
  }
105
-
106
- class FormlyBootstrapInputModule {
107
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
108
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
109
- ReactiveFormsModule,
110
- FormlyBootstrapFormFieldModule, i2.FormlyModule] }); }
111
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapInputModule, imports: [CommonModule,
112
- ReactiveFormsModule,
113
- FormlyBootstrapFormFieldModule,
114
- FormlyModule.forChild(withFormlyFieldInput())] }); }
115
- }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapInputModule, decorators: [{
117
- type: NgModule,
118
- args: [{
119
- declarations: [FormlyFieldInput],
120
- imports: [
121
- CommonModule,
122
- ReactiveFormsModule,
123
- FormlyBootstrapFormFieldModule,
124
- FormlyModule.forChild(withFormlyFieldInput()),
125
- ],
126
- }]
127
- }] });
128
-
129
- /**
130
- * Generated bundle index. Do not edit.
131
- */
132
-
158
+ var FormlyBootstrapInputModule = class FormlyBootstrapInputModule {
159
+ static {
160
+ this.ɵfac = i0.ɵɵngDeclareFactory({
161
+ minVersion: "12.0.0",
162
+ version: "22.2.2",
163
+ ngImport: i0,
164
+ type: FormlyBootstrapInputModule,
165
+ deps: [],
166
+ target: i0.ɵɵFactoryTarget.NgModule
167
+ });
168
+ }
169
+ static {
170
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
171
+ minVersion: "14.0.0",
172
+ version: "22.2.2",
173
+ ngImport: i0,
174
+ type: FormlyBootstrapInputModule,
175
+ declarations: [FormlyFieldInput],
176
+ imports: [
177
+ CommonModule,
178
+ ReactiveFormsModule,
179
+ FormlyBootstrapFormFieldModule,
180
+ i2.FormlyModule
181
+ ]
182
+ });
183
+ }
184
+ static {
185
+ this.ɵinj = i0.ɵɵngDeclareInjector({
186
+ minVersion: "12.0.0",
187
+ version: "22.2.2",
188
+ ngImport: i0,
189
+ type: FormlyBootstrapInputModule,
190
+ imports: [
191
+ CommonModule,
192
+ ReactiveFormsModule,
193
+ FormlyBootstrapFormFieldModule,
194
+ FormlyModule.forChild(withFormlyFieldInput())
195
+ ]
196
+ });
197
+ }
198
+ };
199
+ i0.ɵɵngDeclareClassMetadata({
200
+ minVersion: "12.0.0",
201
+ version: "22.2.2",
202
+ ngImport: i0,
203
+ type: FormlyBootstrapInputModule,
204
+ decorators: [{
205
+ type: NgModule,
206
+ args: [{
207
+ declarations: [FormlyFieldInput],
208
+ imports: [
209
+ CommonModule,
210
+ ReactiveFormsModule,
211
+ FormlyBootstrapFormFieldModule,
212
+ FormlyModule.forChild(withFormlyFieldInput())
213
+ ]
214
+ }]
215
+ }]
216
+ });
133
217
  export { FormlyBootstrapInputModule, FormlyFieldInput, withFormlyFieldInput };
134
- //# sourceMappingURL=ngx-formly-bootstrap-input.mjs.map
218
+
219
+ //# sourceMappingURL=ngx-formly-bootstrap-input.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-bootstrap-input.mjs","sources":["../../../../src/ui/bootstrap/input/src/input.type.ts","../../../../src/ui/bootstrap/input/src/input.config.ts","../../../../src/ui/bootstrap/input/src/input.module.ts","../../../../src/ui/bootstrap/input/src/ngx-formly-bootstrap-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface InputProps extends FormlyFieldProps {}\n\nexport interface FormlyInputFieldConfig extends FormlyFieldConfig<InputProps> {\n type: 'input' | Type<FormlyFieldInput>;\n}\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <ng-template #fieldTypeTemplate>\n @if (type !== 'number') {\n <input\n [type]=\"type\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n } @else {\n <input\n type=\"number\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n }\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig<InputProps>> {\n get type() {\n return this.props.type || 'text';\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldInput } from './input.type';\n\nexport function withFormlyFieldInput(): ConfigOption {\n return {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\n\nimport { FormlyFieldInput } from './input.type';\nimport { withFormlyFieldInput } from './input.config';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild(withFormlyFieldInput()),\n ],\n})\nexport class FormlyBootstrapInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAwCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAC1E,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM;IAClC;+GAHW,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA5BjB;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,QAAA,EAAA,iGAAA,EAAA,EAAA,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,OAAA,EAAA,CAAA,e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AAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAA1B,0BAA0B,EAAA,YAAA,EAAA,CATtB,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAE7B,YAAY;YACZ,mBAAmB;YAEnB,8BAA8B,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;AAIrB,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,0BAA0B,YAPnC,YAAY;YACZ,mBAAmB;YAEnB,8BAA8B;AAC9B,YAAA,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAGpC,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAVtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;AAC9B,wBAAA,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC;AAC9C,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-bootstrap-input.mjs","names":[],"sources":["../../../../src/ui/bootstrap/input/src/input.type.ts","../../../../src/ui/bootstrap/input/src/input.config.ts","../../../../src/ui/bootstrap/input/src/input.module.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface InputProps extends FormlyFieldProps {}\n\nexport interface FormlyInputFieldConfig extends FormlyFieldConfig<InputProps> {\n type: 'input' | Type<FormlyFieldInput>;\n}\n\n@Component({\n selector: 'formly-field-input',\n template: `\n <ng-template #fieldTypeTemplate>\n @if (type !== 'number') {\n <input\n [type]=\"type\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n } @else {\n <input\n type=\"number\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n }\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig<InputProps>> {\n get type() {\n return this.props.type || 'text';\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldInput } from './input.type';\n\nexport function withFormlyFieldInput(): ConfigOption {\n return {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\n\nimport { FormlyFieldInput } from './input.type';\nimport { withFormlyFieldInput } from './input.config';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild(withFormlyFieldInput()),\n ],\n})\nexport class FormlyBootstrapInputModule {}\n"],"mappings":";;;;;;;;AAwCA,IAAa,mBAAb,MAAa,yBAAyB,UAAsC;CA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;GACE,MAAM;GACN,SAAS;GACT,gBAAgB,EACd,OAAO,EACL,MAAM,SACP,EACF;EACF;CACF,EACF;AACH;ACZA,IAAa,6BAAb,MAAa,2BAA0B;CAA1B;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA1B;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,cAAA,CATtB,gBAAgB;GAAA,SAAA;IAE7B;IACA;IAEA;IAA8B,GAAA;GAAA;EAAA,CAAA;CAAA;CAIrB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,SAAA;IAPnC;IACA;IAEA;IACA,aAAa,SAAS,qBAAoB,CAAE;GAAC;EAAA,CAAA;CAAA;;AAGpC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EAVtC,MAAA;EAAS,MAAA,CAAA;GACR,cAAc,CAAC,gBAAgB;GAC/B,SAAS;IACP;IACA;IAEA;IACA,aAAa,SAAS,qBAAoB,CAAE;GAC7C;EACF,CAAA"}
@@ -1,41 +1,51 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
- import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
4
- import * as i1 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
6
- import * as i2 from '@ngx-formly/core';
7
- import { FormlyModule } from '@ngx-formly/core';
8
- import * as i3 from '@ngx-formly/core/select';
9
- import { FormlySelectModule } from '@ngx-formly/core/select';
10
- import { ReactiveFormsModule } from '@angular/forms';
11
-
12
- class FormlyFieldMultiCheckbox extends FieldType {
13
- constructor() {
14
- super(...arguments);
15
- this.defaultOptions = {
16
- props: {
17
- formCheck: 'default', // 'default' | 'inline' | 'switch' | 'inline-switch'
18
- },
19
- };
20
- }
21
- onChange(value, checked) {
22
- this.formControl.markAsDirty();
23
- if (this.props.type === 'array') {
24
- this.formControl.patchValue(checked
25
- ? [...(this.formControl.value || []), value]
26
- : [...(this.formControl.value || [])].filter((o) => o !== value));
27
- }
28
- else {
29
- this.formControl.patchValue({ ...this.formControl.value, [value]: checked });
30
- }
31
- this.formControl.markAsTouched();
32
- }
33
- isChecked(option) {
34
- const value = this.formControl.value;
35
- return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);
36
- }
37
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldMultiCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
38
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FormlyFieldMultiCheckbox, isStandalone: false, selector: "formly-field-multicheckbox", usesInheritance: true, ngImport: i0, template: `
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, NgModule } from "@angular/core";
3
+ import { FieldType, FormlyBootstrapFormFieldModule } from "@ngx-formly/bootstrap/form-field";
4
+ import * as i1 from "@angular/common";
5
+ import { CommonModule } from "@angular/common";
6
+ import * as i2 from "@ngx-formly/core";
7
+ import { FormlyModule } from "@ngx-formly/core";
8
+ import * as i3 from "@ngx-formly/core/select";
9
+ import { FormlySelectModule } from "@ngx-formly/core/select";
10
+ import { ReactiveFormsModule } from "@angular/forms";
11
+ var FormlyFieldMultiCheckbox = class FormlyFieldMultiCheckbox extends FieldType {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.defaultOptions = { props: { formCheck: "default" } };
15
+ }
16
+ onChange(value, checked) {
17
+ this.formControl.markAsDirty();
18
+ if (this.props.type === "array") this.formControl.patchValue(checked ? [...this.formControl.value || [], value] : [...this.formControl.value || []].filter((o) => o !== value));
19
+ else this.formControl.patchValue({
20
+ ...this.formControl.value,
21
+ [value]: checked
22
+ });
23
+ this.formControl.markAsTouched();
24
+ }
25
+ isChecked(option) {
26
+ const value = this.formControl.value;
27
+ return value && (this.props.type === "array" ? value.indexOf(option.value) !== -1 : value[option.value]);
28
+ }
29
+ static {
30
+ this.ɵfac = i0.ɵɵngDeclareFactory({
31
+ minVersion: "12.0.0",
32
+ version: "22.2.2",
33
+ ngImport: i0,
34
+ type: FormlyFieldMultiCheckbox,
35
+ deps: null,
36
+ target: i0.ɵɵFactoryTarget.Component
37
+ });
38
+ }
39
+ static {
40
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
41
+ minVersion: "17.0.0",
42
+ version: "22.2.2",
43
+ type: FormlyFieldMultiCheckbox,
44
+ isStandalone: false,
45
+ selector: "formly-field-multicheckbox",
46
+ usesInheritance: true,
47
+ ngImport: i0,
48
+ template: `
39
49
  <ng-template #fieldTypeTemplate>
40
50
  @for (option of props.options | formlySelectOptions: field | async; track option; let i = $index) {
41
51
  <div
@@ -64,13 +74,45 @@ class FormlyFieldMultiCheckbox extends FieldType {
64
74
  </div>
65
75
  }
66
76
  </ng-template>
67
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.LegacyFormlyAttributes, selector: "[formlyAttributes]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.LegacyFormlySelectOptionsPipe, name: "formlySelectOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyFieldMultiCheckbox, decorators: [{
70
- type: Component,
71
- args: [{
72
- selector: 'formly-field-multicheckbox',
73
- template: `
77
+ `,
78
+ isInline: true,
79
+ dependencies: [
80
+ {
81
+ kind: "directive",
82
+ type: i1.NgClass,
83
+ selector: "[ngClass]",
84
+ inputs: ["class", "ngClass"]
85
+ },
86
+ {
87
+ kind: "directive",
88
+ type: i2.LegacyFormlyAttributes,
89
+ selector: "[formlyAttributes]"
90
+ },
91
+ {
92
+ kind: "pipe",
93
+ type: i1.AsyncPipe,
94
+ name: "async"
95
+ },
96
+ {
97
+ kind: "pipe",
98
+ type: i3.LegacyFormlySelectOptionsPipe,
99
+ name: "formlySelectOptions"
100
+ }
101
+ ],
102
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
103
+ });
104
+ }
105
+ };
106
+ i0.ɵɵngDeclareClassMetadata({
107
+ minVersion: "12.0.0",
108
+ version: "22.2.2",
109
+ ngImport: i0,
110
+ type: FormlyFieldMultiCheckbox,
111
+ decorators: [{
112
+ type: Component,
113
+ args: [{
114
+ selector: "formly-field-multicheckbox",
115
+ template: `
74
116
  <ng-template #fieldTypeTemplate>
75
117
  @for (option of props.options | formlySelectOptions: field | async; track option; let i = $index) {
76
118
  <div
@@ -100,52 +142,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
100
142
  }
101
143
  </ng-template>
102
144
  `,
103
- changeDetection: ChangeDetectionStrategy.OnPush,
104
- standalone: false,
105
- }]
106
- }] });
107
-
145
+ changeDetection: ChangeDetectionStrategy.OnPush,
146
+ standalone: false
147
+ }]
148
+ }]
149
+ });
108
150
  function withFormlyFieldMultiCheckbox() {
109
- return {
110
- types: [
111
- {
112
- name: 'multicheckbox',
113
- component: FormlyFieldMultiCheckbox,
114
- wrappers: ['form-field'],
115
- },
116
- ],
117
- };
151
+ return { types: [{
152
+ name: "multicheckbox",
153
+ component: FormlyFieldMultiCheckbox,
154
+ wrappers: ["form-field"]
155
+ }] };
118
156
  }
119
-
120
- class FormlyBootstrapMultiCheckboxModule {
121
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapMultiCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
122
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapMultiCheckboxModule, declarations: [FormlyFieldMultiCheckbox], imports: [CommonModule,
123
- ReactiveFormsModule,
124
- FormlyBootstrapFormFieldModule,
125
- FormlySelectModule, i2.FormlyModule] }); }
126
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapMultiCheckboxModule, imports: [CommonModule,
127
- ReactiveFormsModule,
128
- FormlyBootstrapFormFieldModule,
129
- FormlySelectModule,
130
- FormlyModule.forChild(withFormlyFieldMultiCheckbox())] }); }
131
- }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlyBootstrapMultiCheckboxModule, decorators: [{
133
- type: NgModule,
134
- args: [{
135
- declarations: [FormlyFieldMultiCheckbox],
136
- imports: [
137
- CommonModule,
138
- ReactiveFormsModule,
139
- FormlyBootstrapFormFieldModule,
140
- FormlySelectModule,
141
- FormlyModule.forChild(withFormlyFieldMultiCheckbox()),
142
- ],
143
- }]
144
- }] });
145
-
146
- /**
147
- * Generated bundle index. Do not edit.
148
- */
149
-
157
+ var FormlyBootstrapMultiCheckboxModule = class FormlyBootstrapMultiCheckboxModule {
158
+ static {
159
+ this.ɵfac = i0.ɵɵngDeclareFactory({
160
+ minVersion: "12.0.0",
161
+ version: "22.2.2",
162
+ ngImport: i0,
163
+ type: FormlyBootstrapMultiCheckboxModule,
164
+ deps: [],
165
+ target: i0.ɵɵFactoryTarget.NgModule
166
+ });
167
+ }
168
+ static {
169
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
170
+ minVersion: "14.0.0",
171
+ version: "22.2.2",
172
+ ngImport: i0,
173
+ type: FormlyBootstrapMultiCheckboxModule,
174
+ declarations: [FormlyFieldMultiCheckbox],
175
+ imports: [
176
+ CommonModule,
177
+ ReactiveFormsModule,
178
+ FormlyBootstrapFormFieldModule,
179
+ FormlySelectModule,
180
+ i2.FormlyModule
181
+ ]
182
+ });
183
+ }
184
+ static {
185
+ this.ɵinj = i0.ɵɵngDeclareInjector({
186
+ minVersion: "12.0.0",
187
+ version: "22.2.2",
188
+ ngImport: i0,
189
+ type: FormlyBootstrapMultiCheckboxModule,
190
+ imports: [
191
+ CommonModule,
192
+ ReactiveFormsModule,
193
+ FormlyBootstrapFormFieldModule,
194
+ FormlySelectModule,
195
+ FormlyModule.forChild(withFormlyFieldMultiCheckbox())
196
+ ]
197
+ });
198
+ }
199
+ };
200
+ i0.ɵɵngDeclareClassMetadata({
201
+ minVersion: "12.0.0",
202
+ version: "22.2.2",
203
+ ngImport: i0,
204
+ type: FormlyBootstrapMultiCheckboxModule,
205
+ decorators: [{
206
+ type: NgModule,
207
+ args: [{
208
+ declarations: [FormlyFieldMultiCheckbox],
209
+ imports: [
210
+ CommonModule,
211
+ ReactiveFormsModule,
212
+ FormlyBootstrapFormFieldModule,
213
+ FormlySelectModule,
214
+ FormlyModule.forChild(withFormlyFieldMultiCheckbox())
215
+ ]
216
+ }]
217
+ }]
218
+ });
150
219
  export { FormlyBootstrapMultiCheckboxModule, FormlyFieldMultiCheckbox, withFormlyFieldMultiCheckbox };
151
- //# sourceMappingURL=ngx-formly-bootstrap-multicheckbox.mjs.map
220
+
221
+ //# sourceMappingURL=ngx-formly-bootstrap-multicheckbox.mjs.map