@ngx-formly/bootstrap 10.0.1 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,26 +1,41 @@
|
|
|
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 { ReactiveFormsModule } from
|
|
8
|
-
import * as i3 from
|
|
9
|
-
import { FormlyModule } from
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 "@angular/forms";
|
|
7
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
8
|
+
import * as i3 from "@ngx-formly/core";
|
|
9
|
+
import { FormlyModule } from "@ngx-formly/core";
|
|
10
|
+
var FormlyFieldCheckbox = class FormlyFieldCheckbox extends FieldType {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.defaultOptions = { props: {
|
|
14
|
+
indeterminate: true,
|
|
15
|
+
hideLabel: true,
|
|
16
|
+
formCheck: "default"
|
|
17
|
+
} };
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
|
+
minVersion: "12.0.0",
|
|
22
|
+
version: "22.2.2",
|
|
23
|
+
ngImport: i0,
|
|
24
|
+
type: FormlyFieldCheckbox,
|
|
25
|
+
deps: null,
|
|
26
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
|
+
minVersion: "17.0.0",
|
|
32
|
+
version: "22.2.2",
|
|
33
|
+
type: FormlyFieldCheckbox,
|
|
34
|
+
isStandalone: false,
|
|
35
|
+
selector: "formly-field-checkbox",
|
|
36
|
+
usesInheritance: true,
|
|
37
|
+
ngImport: i0,
|
|
38
|
+
template: `
|
|
24
39
|
<ng-template #fieldTypeTemplate>
|
|
25
40
|
<div
|
|
26
41
|
class="form-check"
|
|
@@ -42,7 +57,11 @@ class FormlyFieldCheckbox extends FieldType {
|
|
|
42
57
|
/>
|
|
43
58
|
@if (props.formCheck !== 'nolabel') {
|
|
44
59
|
<label [for]="id" class="form-check-label">
|
|
45
|
-
|
|
60
|
+
@if (props.allowHtml) {
|
|
61
|
+
<span [innerHTML]="props.label"></span>
|
|
62
|
+
} @else {
|
|
63
|
+
{{ props.label }}
|
|
64
|
+
}
|
|
46
65
|
@if (props.required && props.hideRequiredMarker !== true) {
|
|
47
66
|
<span aria-hidden="true">*</span>
|
|
48
67
|
}
|
|
@@ -50,13 +69,57 @@ class FormlyFieldCheckbox extends FieldType {
|
|
|
50
69
|
}
|
|
51
70
|
</div>
|
|
52
71
|
</ng-template>
|
|
53
|
-
`,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
72
|
+
`,
|
|
73
|
+
isInline: true,
|
|
74
|
+
dependencies: [
|
|
75
|
+
{
|
|
76
|
+
kind: "directive",
|
|
77
|
+
type: i1.NgClass,
|
|
78
|
+
selector: "[ngClass]",
|
|
79
|
+
inputs: ["class", "ngClass"]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
kind: "directive",
|
|
83
|
+
type: i2.CheckboxControlValueAccessor,
|
|
84
|
+
selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
kind: "directive",
|
|
88
|
+
type: i2.NgControlStatus,
|
|
89
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
kind: "directive",
|
|
93
|
+
type: i2.FormControlDirective,
|
|
94
|
+
selector: "[formControl]",
|
|
95
|
+
inputs: [
|
|
96
|
+
"formControl",
|
|
97
|
+
"disabled",
|
|
98
|
+
"ngModel"
|
|
99
|
+
],
|
|
100
|
+
outputs: ["ngModelChange"],
|
|
101
|
+
exportAs: ["ngForm"]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
kind: "directive",
|
|
105
|
+
type: i3.LegacyFormlyAttributes,
|
|
106
|
+
selector: "[formlyAttributes]"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
114
|
+
minVersion: "12.0.0",
|
|
115
|
+
version: "22.2.2",
|
|
116
|
+
ngImport: i0,
|
|
117
|
+
type: FormlyFieldCheckbox,
|
|
118
|
+
decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{
|
|
121
|
+
selector: "formly-field-checkbox",
|
|
122
|
+
template: `
|
|
60
123
|
<ng-template #fieldTypeTemplate>
|
|
61
124
|
<div
|
|
62
125
|
class="form-check"
|
|
@@ -78,7 +141,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
78
141
|
/>
|
|
79
142
|
@if (props.formCheck !== 'nolabel') {
|
|
80
143
|
<label [for]="id" class="form-check-label">
|
|
81
|
-
|
|
144
|
+
@if (props.allowHtml) {
|
|
145
|
+
<span [innerHTML]="props.label"></span>
|
|
146
|
+
} @else {
|
|
147
|
+
{{ props.label }}
|
|
148
|
+
}
|
|
82
149
|
@if (props.required && props.hideRequiredMarker !== true) {
|
|
83
150
|
<span aria-hidden="true">*</span>
|
|
84
151
|
}
|
|
@@ -87,53 +154,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
87
154
|
</div>
|
|
88
155
|
</ng-template>
|
|
89
156
|
`,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
157
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
158
|
+
standalone: false
|
|
159
|
+
}]
|
|
160
|
+
}]
|
|
161
|
+
});
|
|
95
162
|
function withFormlyFieldCheckbox() {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
name: 'boolean',
|
|
105
|
-
extends: 'checkbox',
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
};
|
|
163
|
+
return { types: [{
|
|
164
|
+
name: "checkbox",
|
|
165
|
+
component: FormlyFieldCheckbox,
|
|
166
|
+
wrappers: ["form-field"]
|
|
167
|
+
}, {
|
|
168
|
+
name: "boolean",
|
|
169
|
+
extends: "checkbox"
|
|
170
|
+
}] };
|
|
109
171
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
172
|
+
var FormlyBootstrapCheckboxModule = class FormlyBootstrapCheckboxModule {
|
|
173
|
+
static {
|
|
174
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
175
|
+
minVersion: "12.0.0",
|
|
176
|
+
version: "22.2.2",
|
|
177
|
+
ngImport: i0,
|
|
178
|
+
type: FormlyBootstrapCheckboxModule,
|
|
179
|
+
deps: [],
|
|
180
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
static {
|
|
184
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
185
|
+
minVersion: "14.0.0",
|
|
186
|
+
version: "22.2.2",
|
|
187
|
+
ngImport: i0,
|
|
188
|
+
type: FormlyBootstrapCheckboxModule,
|
|
189
|
+
declarations: [FormlyFieldCheckbox],
|
|
190
|
+
imports: [
|
|
191
|
+
CommonModule,
|
|
192
|
+
ReactiveFormsModule,
|
|
193
|
+
FormlyBootstrapFormFieldModule,
|
|
194
|
+
i3.FormlyModule
|
|
195
|
+
]
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
static {
|
|
199
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
200
|
+
minVersion: "12.0.0",
|
|
201
|
+
version: "22.2.2",
|
|
202
|
+
ngImport: i0,
|
|
203
|
+
type: FormlyBootstrapCheckboxModule,
|
|
204
|
+
imports: [
|
|
205
|
+
CommonModule,
|
|
206
|
+
ReactiveFormsModule,
|
|
207
|
+
FormlyBootstrapFormFieldModule,
|
|
208
|
+
FormlyModule.forChild(withFormlyFieldCheckbox())
|
|
209
|
+
]
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
214
|
+
minVersion: "12.0.0",
|
|
215
|
+
version: "22.2.2",
|
|
216
|
+
ngImport: i0,
|
|
217
|
+
type: FormlyBootstrapCheckboxModule,
|
|
218
|
+
decorators: [{
|
|
219
|
+
type: NgModule,
|
|
220
|
+
args: [{
|
|
221
|
+
declarations: [FormlyFieldCheckbox],
|
|
222
|
+
imports: [
|
|
223
|
+
CommonModule,
|
|
224
|
+
ReactiveFormsModule,
|
|
225
|
+
FormlyBootstrapFormFieldModule,
|
|
226
|
+
FormlyModule.forChild(withFormlyFieldCheckbox())
|
|
227
|
+
]
|
|
228
|
+
}]
|
|
229
|
+
}]
|
|
230
|
+
});
|
|
138
231
|
export { FormlyBootstrapCheckboxModule, FormlyFieldCheckbox, withFormlyFieldCheckbox };
|
|
139
|
-
|
|
232
|
+
|
|
233
|
+
//# sourceMappingURL=ngx-formly-bootstrap-checkbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap-checkbox.mjs","sources":["../../../../src/ui/bootstrap/checkbox/src/checkbox.type.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.config.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.module.ts"
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-checkbox.mjs","names":[],"sources":["../../../../src/ui/bootstrap/checkbox/src/checkbox.type.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.config.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.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 CheckboxProps extends FormlyFieldProps {\n formCheck?: 'default' | 'inline' | 'switch' | 'inline-switch' | 'nolabel';\n indeterminate?: boolean;\n}\n\nexport interface FormlyCheckboxFieldConfig extends FormlyFieldConfig<CheckboxProps> {\n type: 'checkbox' | Type<FormlyFieldCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-checkbox',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n class=\"form-check\"\n [ngClass]=\"{\n 'form-check-inline': props.formCheck === 'inline' || props.formCheck === 'inline-switch',\n 'form-switch': props.formCheck === 'switch' || props.formCheck === 'inline-switch',\n }\"\n >\n <input\n type=\"checkbox\"\n [class.is-invalid]=\"showError\"\n class=\"form-check-input\"\n [class.position-static]=\"props.formCheck === 'nolabel'\"\n [indeterminate]=\"props.indeterminate && formControl.value == null\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n @if (props.formCheck !== 'nolabel') {\n <label [for]=\"id\" class=\"form-check-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 </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldCheckbox extends FieldType<FieldTypeConfig<CheckboxProps>> {\n override defaultOptions = {\n props: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'default' as const,\n },\n };\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\nexport function withFormlyFieldCheckbox(): ConfigOption {\n return {\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\n\nimport { FormlyFieldCheckbox } from './checkbox.type';\nimport { withFormlyFieldCheckbox } from './checkbox.config';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckbox()),\n ],\n})\nexport class FormlyBootstrapCheckboxModule {}\n"],"mappings":";;;;;;;;;AAqDA,IAAa,sBAAb,MAAa,4BAA4B,UAAyC;CAxClF,cAAA;;EAyCW,KAAA,iBAAiB,EACxB,OAAO;GACL,eAAe;GACf,WAAW;GACX,WAAW;EACZ,EACF;CACF;CARY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAnB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAmB,cAAA;GAAA,UAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UAtCpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCT,UAAA;GAAA,cAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA,CAAA,SAAA,SAAA;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;CAAmB,YAAA,CAAA;EAxC/B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCV,iBAAiB,wBAAwB;GACzC,YAAY;EACb,CAAA;;;ACjDD,SAAgB,0BAAuB;CACrC,OAAO,EACL,OAAO,CACL;EACE,MAAM;EACN,WAAW;EACX,UAAU,CAAC,YAAY;CACxB,GACD;EACE,MAAM;EACN,SAAS;CACV,CACF,EACF;AACH;ACEA,IAAa,gCAAb,MAAa,8BAA6B;CAA7B;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA7B;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,cAAA,CARzB,mBAAmB;GAAA,SAAA;IAEhC;IACA;IACA;IAA8B,GAAA;GAAA;EAAA,CAAA;CAAA;CAIrB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,SAAA;IANtC;IACA;IACA;IACA,aAAa,SAAS,wBAAuB,CAAE;GAAC;EAAA,CAAA;CAAA;;AAGvC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA6B,YAAA,CAAA;EATzC,MAAA;EAAS,MAAA,CAAA;GACR,cAAc,CAAC,mBAAmB;GAClC,SAAS;IACP;IACA;IACA;IACA,aAAa,SAAS,wBAAuB,CAAE;GAChD;EACF,CAAA"}
|
|
@@ -1,18 +1,39 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Component,
|
|
3
|
-
import * as i2 from
|
|
4
|
-
import {
|
|
5
|
-
import * as i1 from
|
|
6
|
-
import { CommonModule } from
|
|
7
|
-
import { ReactiveFormsModule } from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, Directive, NgModule, Optional, ViewChild } from "@angular/core";
|
|
3
|
+
import * as i2 from "@ngx-formly/core";
|
|
4
|
+
import { FieldType as FieldType$1, 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
|
+
var FormlyWrapperFormField = class FormlyWrapperFormField extends FieldWrapper {
|
|
9
|
+
static {
|
|
10
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
11
|
+
minVersion: "12.0.0",
|
|
12
|
+
version: "22.2.2",
|
|
13
|
+
ngImport: i0,
|
|
14
|
+
type: FormlyWrapperFormField,
|
|
15
|
+
deps: null,
|
|
16
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
21
|
+
minVersion: "17.0.0",
|
|
22
|
+
version: "22.2.2",
|
|
23
|
+
type: FormlyWrapperFormField,
|
|
24
|
+
isStandalone: false,
|
|
25
|
+
selector: "formly-wrapper-form-field",
|
|
26
|
+
usesInheritance: true,
|
|
27
|
+
ngImport: i0,
|
|
28
|
+
template: `
|
|
12
29
|
<ng-template #labelTemplate>
|
|
13
30
|
@if (props.label && props.hideLabel !== true) {
|
|
14
31
|
<label [attr.for]="id" class="form-label">
|
|
15
|
-
|
|
32
|
+
@if (props.allowHtml) {
|
|
33
|
+
<span [innerHTML]="props.label"></span>
|
|
34
|
+
} @else {
|
|
35
|
+
{{ props.label }}
|
|
36
|
+
}
|
|
16
37
|
@if (props.required && props.hideRequiredMarker !== true) {
|
|
17
38
|
<span aria-hidden="true">*</span>
|
|
18
39
|
}
|
|
@@ -42,18 +63,53 @@ class FormlyWrapperFormField extends FieldWrapper {
|
|
|
42
63
|
}
|
|
43
64
|
|
|
44
65
|
@if (props.description) {
|
|
45
|
-
<small class="form-text text-muted">
|
|
66
|
+
<small class="form-text text-muted">
|
|
67
|
+
@if (props.allowHtml) {
|
|
68
|
+
<span [innerHTML]="props.description"></span>
|
|
69
|
+
} @else {
|
|
70
|
+
<ng-container>{{ props.description }}</ng-container>
|
|
71
|
+
}
|
|
72
|
+
</small>
|
|
46
73
|
}
|
|
47
74
|
</div>
|
|
48
|
-
`,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
75
|
+
`,
|
|
76
|
+
isInline: true,
|
|
77
|
+
styles: [":host{display:block;margin-bottom:1rem}\n"],
|
|
78
|
+
dependencies: [{
|
|
79
|
+
kind: "directive",
|
|
80
|
+
type: i1.NgTemplateOutlet,
|
|
81
|
+
selector: "[ngTemplateOutlet]",
|
|
82
|
+
inputs: [
|
|
83
|
+
"ngTemplateOutletContext",
|
|
84
|
+
"ngTemplateOutlet",
|
|
85
|
+
"ngTemplateOutletInjector"
|
|
86
|
+
]
|
|
87
|
+
}, {
|
|
88
|
+
kind: "component",
|
|
89
|
+
type: i2.LegacyFormlyValidationMessage,
|
|
90
|
+
selector: "formly-validation-message"
|
|
91
|
+
}]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
96
|
+
minVersion: "12.0.0",
|
|
97
|
+
version: "22.2.2",
|
|
98
|
+
ngImport: i0,
|
|
99
|
+
type: FormlyWrapperFormField,
|
|
100
|
+
decorators: [{
|
|
101
|
+
type: Component,
|
|
102
|
+
args: [{
|
|
103
|
+
selector: "formly-wrapper-form-field",
|
|
104
|
+
template: `
|
|
53
105
|
<ng-template #labelTemplate>
|
|
54
106
|
@if (props.label && props.hideLabel !== true) {
|
|
55
107
|
<label [attr.for]="id" class="form-label">
|
|
56
|
-
|
|
108
|
+
@if (props.allowHtml) {
|
|
109
|
+
<span [innerHTML]="props.label"></span>
|
|
110
|
+
} @else {
|
|
111
|
+
{{ props.label }}
|
|
112
|
+
}
|
|
57
113
|
@if (props.required && props.hideRequiredMarker !== true) {
|
|
58
114
|
<span aria-hidden="true">*</span>
|
|
59
115
|
}
|
|
@@ -83,61 +139,137 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
83
139
|
}
|
|
84
140
|
|
|
85
141
|
@if (props.description) {
|
|
86
|
-
<small class="form-text text-muted">
|
|
142
|
+
<small class="form-text text-muted">
|
|
143
|
+
@if (props.allowHtml) {
|
|
144
|
+
<span [innerHTML]="props.description"></span>
|
|
145
|
+
} @else {
|
|
146
|
+
<ng-container>{{ props.description }}</ng-container>
|
|
147
|
+
}
|
|
148
|
+
</small>
|
|
87
149
|
}
|
|
88
150
|
</div>
|
|
89
|
-
`,
|
|
90
|
-
|
|
91
|
-
|
|
151
|
+
`,
|
|
152
|
+
standalone: false,
|
|
153
|
+
styles: [":host{display:block;margin-bottom:1rem}\n"]
|
|
154
|
+
}]
|
|
155
|
+
}]
|
|
156
|
+
});
|
|
92
157
|
function withFormlyFormField() {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
component: FormlyWrapperFormField,
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
};
|
|
158
|
+
return { wrappers: [{
|
|
159
|
+
name: "form-field",
|
|
160
|
+
component: FormlyWrapperFormField
|
|
161
|
+
}] };
|
|
101
162
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
163
|
+
var FormlyBootstrapFormFieldModule = class FormlyBootstrapFormFieldModule {
|
|
164
|
+
static {
|
|
165
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
166
|
+
minVersion: "12.0.0",
|
|
167
|
+
version: "22.2.2",
|
|
168
|
+
ngImport: i0,
|
|
169
|
+
type: FormlyBootstrapFormFieldModule,
|
|
170
|
+
deps: [],
|
|
171
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
static {
|
|
175
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
176
|
+
minVersion: "14.0.0",
|
|
177
|
+
version: "22.2.2",
|
|
178
|
+
ngImport: i0,
|
|
179
|
+
type: FormlyBootstrapFormFieldModule,
|
|
180
|
+
declarations: [FormlyWrapperFormField],
|
|
181
|
+
imports: [
|
|
182
|
+
CommonModule,
|
|
183
|
+
ReactiveFormsModule,
|
|
184
|
+
i2.FormlyModule
|
|
185
|
+
]
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
static {
|
|
189
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
190
|
+
minVersion: "12.0.0",
|
|
191
|
+
version: "22.2.2",
|
|
192
|
+
ngImport: i0,
|
|
193
|
+
type: FormlyBootstrapFormFieldModule,
|
|
194
|
+
imports: [
|
|
195
|
+
CommonModule,
|
|
196
|
+
ReactiveFormsModule,
|
|
197
|
+
FormlyModule.forChild(withFormlyFormField())
|
|
198
|
+
]
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
203
|
+
minVersion: "12.0.0",
|
|
204
|
+
version: "22.2.2",
|
|
205
|
+
ngImport: i0,
|
|
206
|
+
type: FormlyBootstrapFormFieldModule,
|
|
207
|
+
decorators: [{
|
|
208
|
+
type: NgModule,
|
|
209
|
+
args: [{
|
|
210
|
+
declarations: [FormlyWrapperFormField],
|
|
211
|
+
imports: [
|
|
212
|
+
CommonModule,
|
|
213
|
+
ReactiveFormsModule,
|
|
214
|
+
FormlyModule.forChild(withFormlyFormField())
|
|
215
|
+
]
|
|
216
|
+
}]
|
|
217
|
+
}]
|
|
218
|
+
});
|
|
219
|
+
var FieldType = class FieldType extends FieldType$1 {
|
|
220
|
+
set content(templateRef) {
|
|
221
|
+
if (templateRef && this.hostContainerRef) this.hostContainerRef.createEmbeddedView(templateRef);
|
|
222
|
+
}
|
|
223
|
+
constructor(hostContainerRef) {
|
|
224
|
+
super();
|
|
225
|
+
this.hostContainerRef = hostContainerRef;
|
|
226
|
+
}
|
|
227
|
+
static {
|
|
228
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
229
|
+
minVersion: "12.0.0",
|
|
230
|
+
version: "22.2.2",
|
|
231
|
+
ngImport: i0,
|
|
232
|
+
type: FieldType,
|
|
233
|
+
deps: [{
|
|
234
|
+
token: i0.ViewContainerRef,
|
|
235
|
+
optional: true
|
|
236
|
+
}],
|
|
237
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
static {
|
|
241
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
242
|
+
minVersion: "14.0.0",
|
|
243
|
+
version: "22.2.2",
|
|
244
|
+
type: FieldType,
|
|
245
|
+
isStandalone: true,
|
|
246
|
+
viewQueries: [{
|
|
247
|
+
propertyName: "content",
|
|
248
|
+
first: true,
|
|
249
|
+
predicate: ["fieldTypeTemplate"],
|
|
250
|
+
descendants: true,
|
|
251
|
+
static: true
|
|
252
|
+
}],
|
|
253
|
+
usesInheritance: true,
|
|
254
|
+
ngImport: i0
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
259
|
+
minVersion: "12.0.0",
|
|
260
|
+
version: "22.2.2",
|
|
261
|
+
ngImport: i0,
|
|
262
|
+
type: FieldType,
|
|
263
|
+
decorators: [{ type: Directive }],
|
|
264
|
+
ctorParameters: () => [{
|
|
265
|
+
type: i0.ViewContainerRef,
|
|
266
|
+
decorators: [{ type: Optional }]
|
|
267
|
+
}],
|
|
268
|
+
propDecorators: { content: [{
|
|
269
|
+
type: ViewChild,
|
|
270
|
+
args: ["fieldTypeTemplate", { static: true }]
|
|
271
|
+
}] }
|
|
272
|
+
});
|
|
142
273
|
export { FieldType, FormlyBootstrapFormFieldModule, withFormlyFormField };
|
|
143
|
-
|
|
274
|
+
|
|
275
|
+
//# sourceMappingURL=ngx-formly-bootstrap-form-field.mjs.map
|