@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.
- package/README.md +88 -177
- package/fesm2022/ngx-formly-bootstrap-addons.mjs +150 -65
- package/fesm2022/ngx-formly-bootstrap-addons.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-checkbox.mjs +173 -79
- package/fesm2022/ngx-formly-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-form-field.mjs +204 -72
- package/fesm2022/ngx-formly-bootstrap-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-input.mjs +169 -84
- package/fesm2022/ngx-formly-bootstrap-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-multicheckbox.mjs +161 -91
- package/fesm2022/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-radio.mjs +181 -79
- package/fesm2022/ngx-formly-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-select.mjs +189 -79
- package/fesm2022/ngx-formly-bootstrap-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-textarea.mjs +152 -71
- package/fesm2022/ngx-formly-bootstrap-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap.mjs +89 -66
- package/fesm2022/ngx-formly-bootstrap.mjs.map +1 -1
- package/package.json +2 -2
- package/types/ngx-formly-bootstrap-addons.d.ts +30 -34
- package/types/ngx-formly-bootstrap-checkbox.d.ts +27 -32
- package/types/ngx-formly-bootstrap-form-field.d.ts +26 -30
- package/types/ngx-formly-bootstrap-input.d.ts +21 -27
- package/types/ngx-formly-bootstrap-multicheckbox.d.ts +27 -32
- package/types/ngx-formly-bootstrap-radio.d.ts +27 -32
- package/types/ngx-formly-bootstrap-select.d.ts +27 -32
- package/types/ngx-formly-bootstrap-textarea.d.ts +26 -31
- 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"
|
|
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,gBAAA;EAA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} from
|
|
3
|
-
import { FieldType, FormlyBootstrapFormFieldModule } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { ReactiveFormsModule } from
|
|
6
|
-
import * as i2 from
|
|
7
|
-
import { FormlyModule } from
|
|
8
|
-
import { CommonModule } from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
`,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
130
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
131
|
+
standalone: false
|
|
132
|
+
}]
|
|
133
|
+
}]
|
|
134
|
+
});
|
|
75
135
|
function withFormlyFieldInput() {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
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"
|
|
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;CAC1E,IAAI,OAAI;EACN,OAAO,KAAK,MAAM,QAAQ;CAC5B;CAHW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAgB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAhB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAgB,cAAA;GAAA,UAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UA5BjB;;;;;;;;;;;;;;;;;;;;;;;;;GAwBT,UAAA;GAAA,cAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,eAAA;KAAA,UAAA,CAAA,QAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAIU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,Y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@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { ChangeDetectionStrategy, Component, NgModule } from
|
|
3
|
-
import { FieldType, FormlyBootstrapFormFieldModule } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { CommonModule } from
|
|
6
|
-
import * as i2 from
|
|
7
|
-
import { FormlyModule } from
|
|
8
|
-
import * as i3 from
|
|
9
|
-
import { FormlySelectModule } from
|
|
10
|
-
import { ReactiveFormsModule } from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
`,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
145
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
146
|
+
standalone: false
|
|
147
|
+
}]
|
|
148
|
+
}]
|
|
149
|
+
});
|
|
108
150
|
function withFormlyFieldMultiCheckbox() {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
220
|
+
|
|
221
|
+
//# sourceMappingURL=ngx-formly-bootstrap-multicheckbox.mjs.map
|