@ngx-formly/bootstrap 6.0.0-next.9 → 6.0.0-rc.2
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 +15 -14
- package/addons/addons.component.d.ts +20 -2
- package/checkbox/checkbox.type.d.ts +14 -4
- package/checkbox/public_api.d.ts +1 -1
- package/esm2020/addons/addon.extension.mjs +3 -3
- package/esm2020/addons/addons.component.mjs +21 -9
- package/esm2020/addons/addons.module.mjs +5 -5
- package/esm2020/checkbox/checkbox.module.mjs +5 -5
- package/esm2020/checkbox/checkbox.type.mjs +53 -49
- package/esm2020/checkbox/public_api.mjs +1 -1
- package/esm2020/form-field/field.type.mjs +25 -0
- package/esm2020/form-field/form-field.module.mjs +5 -5
- package/esm2020/form-field/form-field.wrapper.mjs +35 -15
- package/esm2020/form-field/public_api.mjs +2 -1
- package/esm2020/input/input.module.mjs +9 -9
- package/esm2020/input/input.type.mjs +30 -26
- package/esm2020/input/public_api.mjs +1 -1
- package/esm2020/lib/bootstrap.module.mjs +5 -5
- package/esm2020/multicheckbox/multicheckbox.module.mjs +5 -5
- package/esm2020/multicheckbox/multicheckbox.type.mjs +58 -53
- package/esm2020/multicheckbox/public_api.mjs +1 -1
- package/esm2020/radio/public_api.mjs +1 -1
- package/esm2020/radio/radio.module.mjs +5 -5
- package/esm2020/radio/radio.type.mjs +54 -50
- package/esm2020/select/public_api.mjs +1 -1
- package/esm2020/select/select.module.mjs +5 -5
- package/esm2020/select/select.type.mjs +62 -90
- package/esm2020/textarea/public_api.mjs +1 -1
- package/esm2020/textarea/textarea.module.mjs +5 -5
- package/esm2020/textarea/textarea.type.mjs +28 -24
- package/fesm2015/ngx-formly-bootstrap-addons.mjs +26 -14
- package/fesm2015/ngx-formly-bootstrap-addons.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-checkbox.mjs +57 -53
- package/fesm2015/ngx-formly-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-form-field.mjs +65 -21
- package/fesm2015/ngx-formly-bootstrap-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-input.mjs +38 -34
- package/fesm2015/ngx-formly-bootstrap-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs +62 -57
- package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-radio.mjs +58 -54
- package/fesm2015/ngx-formly-bootstrap-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-select.mjs +66 -94
- package/fesm2015/ngx-formly-bootstrap-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-textarea.mjs +32 -28
- package/fesm2015/ngx-formly-bootstrap-textarea.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap.mjs +4 -4
- package/fesm2015/ngx-formly-bootstrap.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-addons.mjs +26 -14
- package/fesm2020/ngx-formly-bootstrap-addons.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-checkbox.mjs +57 -53
- package/fesm2020/ngx-formly-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-form-field.mjs +63 -21
- package/fesm2020/ngx-formly-bootstrap-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-input.mjs +38 -34
- package/fesm2020/ngx-formly-bootstrap-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-multicheckbox.mjs +62 -57
- package/fesm2020/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-radio.mjs +58 -54
- package/fesm2020/ngx-formly-bootstrap-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-select.mjs +66 -94
- package/fesm2020/ngx-formly-bootstrap-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-textarea.mjs +32 -28
- package/fesm2020/ngx-formly-bootstrap-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap.mjs +4 -4
- package/fesm2020/ngx-formly-bootstrap.mjs.map +1 -1
- package/form-field/field.type.d.ts +10 -0
- package/form-field/form-field.wrapper.d.ts +7 -2
- package/form-field/public_api.d.ts +2 -0
- package/input/input.type.d.ts +10 -2
- package/input/public_api.d.ts +1 -1
- package/multicheckbox/multicheckbox.type.d.ts +13 -4
- package/multicheckbox/public_api.d.ts +1 -1
- package/package.json +2 -2
- package/radio/public_api.d.ts +1 -1
- package/radio/radio.type.d.ts +13 -4
- package/select/public_api.d.ts +1 -1
- package/select/select.type.d.ts +15 -5
- package/textarea/public_api.d.ts +1 -1
- package/textarea/textarea.type.d.ts +13 -3
|
@@ -3,73 +3,77 @@ import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3 from '@ngx-formly/core';
|
|
6
|
-
import {
|
|
6
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
8
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
9
|
+
import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
10
10
|
|
|
11
11
|
class FormlyFieldCheckbox extends FieldType {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.defaultOptions = {
|
|
15
|
-
|
|
15
|
+
props: {
|
|
16
16
|
indeterminate: true,
|
|
17
17
|
hideLabel: true,
|
|
18
|
-
formCheck: 'default',
|
|
18
|
+
formCheck: 'default',
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
FormlyFieldCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
24
|
-
FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
FormlyFieldCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldCheckbox, selector: "formly-field-checkbox", usesInheritance: true, ngImport: i0, template: `
|
|
25
|
+
<ng-template #fieldTypeTemplate>
|
|
26
|
+
<div
|
|
27
|
+
class="form-check"
|
|
28
|
+
[ngClass]="{
|
|
29
|
+
'form-check-inline': props.formCheck === 'inline' || props.formCheck === 'inline-switch',
|
|
30
|
+
'form-switch': props.formCheck === 'switch' || props.formCheck === 'inline-switch'
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
<input
|
|
34
|
+
type="checkbox"
|
|
35
|
+
[class.is-invalid]="showError"
|
|
36
|
+
class="form-check-input"
|
|
37
|
+
[class.position-static]="props.formCheck === 'nolabel'"
|
|
38
|
+
[indeterminate]="props.indeterminate && formControl.value == null"
|
|
39
|
+
[formControl]="formControl"
|
|
40
|
+
[formlyAttributes]="field"
|
|
41
|
+
/>
|
|
42
|
+
<label *ngIf="props.formCheck !== 'nolabel'" [for]="id" class="form-check-label">
|
|
43
|
+
{{ props.label }}
|
|
44
|
+
<span *ngIf="props.required && props.hideRequiredMarker !== true" aria-hidden="true">*</span>
|
|
45
|
+
</label>
|
|
46
|
+
</div>
|
|
47
|
+
</ng-template>
|
|
46
48
|
`, isInline: true, directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
|
|
48
50
|
type: Component,
|
|
49
51
|
args: [{
|
|
50
52
|
selector: 'formly-field-checkbox',
|
|
51
53
|
template: `
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
<ng-template #fieldTypeTemplate>
|
|
55
|
+
<div
|
|
56
|
+
class="form-check"
|
|
57
|
+
[ngClass]="{
|
|
58
|
+
'form-check-inline': props.formCheck === 'inline' || props.formCheck === 'inline-switch',
|
|
59
|
+
'form-switch': props.formCheck === 'switch' || props.formCheck === 'inline-switch'
|
|
60
|
+
}"
|
|
61
|
+
>
|
|
62
|
+
<input
|
|
63
|
+
type="checkbox"
|
|
64
|
+
[class.is-invalid]="showError"
|
|
65
|
+
class="form-check-input"
|
|
66
|
+
[class.position-static]="props.formCheck === 'nolabel'"
|
|
67
|
+
[indeterminate]="props.indeterminate && formControl.value == null"
|
|
68
|
+
[formControl]="formControl"
|
|
69
|
+
[formlyAttributes]="field"
|
|
70
|
+
/>
|
|
71
|
+
<label *ngIf="props.formCheck !== 'nolabel'" [for]="id" class="form-check-label">
|
|
72
|
+
{{ props.label }}
|
|
73
|
+
<span *ngIf="props.required && props.hideRequiredMarker !== true" aria-hidden="true">*</span>
|
|
74
|
+
</label>
|
|
75
|
+
</div>
|
|
76
|
+
</ng-template>
|
|
73
77
|
`,
|
|
74
78
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
75
79
|
}]
|
|
@@ -77,11 +81,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
77
81
|
|
|
78
82
|
class FormlyBootstrapCheckboxModule {
|
|
79
83
|
}
|
|
80
|
-
FormlyBootstrapCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
81
|
-
FormlyBootstrapCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
84
|
+
FormlyBootstrapCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
85
|
+
FormlyBootstrapCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
|
|
82
86
|
ReactiveFormsModule,
|
|
83
87
|
FormlyBootstrapFormFieldModule, i3.FormlyModule] });
|
|
84
|
-
FormlyBootstrapCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
88
|
+
FormlyBootstrapCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapCheckboxModule, imports: [[
|
|
85
89
|
CommonModule,
|
|
86
90
|
ReactiveFormsModule,
|
|
87
91
|
FormlyBootstrapFormFieldModule,
|
|
@@ -99,7 +103,7 @@ FormlyBootstrapCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12
|
|
|
99
103
|
],
|
|
100
104
|
}),
|
|
101
105
|
]] });
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapCheckboxModule, decorators: [{
|
|
103
107
|
type: NgModule,
|
|
104
108
|
args: [{
|
|
105
109
|
declarations: [FormlyFieldCheckbox],
|
|
@@ -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.module.ts","../../../../src/ui/bootstrap/checkbox/src/ngx-formly-bootstrap-checkbox.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-checkbox.mjs","sources":["../../../../src/ui/bootstrap/checkbox/src/checkbox.type.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.module.ts","../../../../src/ui/bootstrap/checkbox/src/ngx-formly-bootstrap-checkbox.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 />\n <label *ngIf=\"props.formCheck !== 'nolabel'\" [for]=\"id\" class=\"form-check-label\">\n {{ props.label }}\n <span *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\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 { 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';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild({\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})\nexport class FormlyBootstrapCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AA0CM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA7BlF,IAAA,WAAA,GAAA;;AA8BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,aAAa,EAAE,IAAI;AACnB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,SAAS,EAAE,SAAkB;AAC9B,aAAA;SACF,CAAC;AACH,KAAA;;iHARY,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,EA3BpB,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,4BAAA,EAAA,QAAA,EAAA,uGAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,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pB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,UAAU;AAChB,wBAAA,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACD,oBAAA;AACE,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,OAAO,EAAE,UAAU;AACpB,qBAAA;AACF,iBAAA;aACF,CAAC;AACH,SAAA,CAAA,EAAA,CAAA,CAAA;4FAEU,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBArBzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,8BAA8B;wBAC9B,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA;AACE,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,OAAO,EAAE,UAAU;AACpB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;AAEG;;;;"}
|
|
@@ -1,48 +1,68 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, NgModule, Directive, Optional, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@ngx-formly/core';
|
|
6
|
-
import { FieldWrapper, FormlyModule } from '@ngx-formly/core';
|
|
6
|
+
import { FieldWrapper, FormlyModule, FieldType as FieldType$1 } from '@ngx-formly/core';
|
|
7
7
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
|
|
9
9
|
class FormlyWrapperFormField extends FieldWrapper {
|
|
10
10
|
}
|
|
11
|
-
FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
12
|
-
FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
13
|
-
<
|
|
14
|
-
<label *ngIf="
|
|
15
|
-
{{
|
|
16
|
-
<span *ngIf="
|
|
11
|
+
FormlyWrapperFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyWrapperFormField, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
+
FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyWrapperFormField, selector: "formly-wrapper-form-field", usesInheritance: true, ngImport: i0, template: `
|
|
13
|
+
<ng-template #labelTemplate>
|
|
14
|
+
<label *ngIf="props.label && props.hideLabel !== true" [attr.for]="id" class="form-label">
|
|
15
|
+
{{ props.label }}
|
|
16
|
+
<span *ngIf="props.required && props.hideRequiredMarker !== true" aria-hidden="true">*</span>
|
|
17
17
|
</label>
|
|
18
|
+
</ng-template>
|
|
19
|
+
|
|
20
|
+
<div class="mb-3" [class.form-floating]="props.labelPosition === 'floating'" [class.has-error]="showError">
|
|
21
|
+
<ng-container *ngIf="props.labelPosition !== 'floating'">
|
|
22
|
+
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
23
|
+
</ng-container>
|
|
18
24
|
|
|
19
25
|
<ng-template #fieldComponent></ng-template>
|
|
20
26
|
|
|
27
|
+
<ng-container *ngIf="props.labelPosition === 'floating'">
|
|
28
|
+
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
29
|
+
</ng-container>
|
|
30
|
+
|
|
21
31
|
<div *ngIf="showError" class="invalid-feedback" [style.display]="'block'">
|
|
22
32
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
23
33
|
</div>
|
|
24
34
|
|
|
25
|
-
<small *ngIf="
|
|
35
|
+
<small *ngIf="props.description" class="form-text text-muted">{{ props.description }}</small>
|
|
26
36
|
</div>
|
|
27
|
-
`, isInline: true, components: [{ type: i1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
37
|
+
`, isInline: true, components: [{ type: i1.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
|
|
29
39
|
type: Component,
|
|
30
40
|
args: [{
|
|
31
41
|
selector: 'formly-wrapper-form-field',
|
|
32
42
|
template: `
|
|
33
|
-
<
|
|
34
|
-
<label *ngIf="
|
|
35
|
-
{{
|
|
36
|
-
<span *ngIf="
|
|
43
|
+
<ng-template #labelTemplate>
|
|
44
|
+
<label *ngIf="props.label && props.hideLabel !== true" [attr.for]="id" class="form-label">
|
|
45
|
+
{{ props.label }}
|
|
46
|
+
<span *ngIf="props.required && props.hideRequiredMarker !== true" aria-hidden="true">*</span>
|
|
37
47
|
</label>
|
|
48
|
+
</ng-template>
|
|
49
|
+
|
|
50
|
+
<div class="mb-3" [class.form-floating]="props.labelPosition === 'floating'" [class.has-error]="showError">
|
|
51
|
+
<ng-container *ngIf="props.labelPosition !== 'floating'">
|
|
52
|
+
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
53
|
+
</ng-container>
|
|
38
54
|
|
|
39
55
|
<ng-template #fieldComponent></ng-template>
|
|
40
56
|
|
|
57
|
+
<ng-container *ngIf="props.labelPosition === 'floating'">
|
|
58
|
+
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
59
|
+
</ng-container>
|
|
60
|
+
|
|
41
61
|
<div *ngIf="showError" class="invalid-feedback" [style.display]="'block'">
|
|
42
62
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
43
63
|
</div>
|
|
44
64
|
|
|
45
|
-
<small *ngIf="
|
|
65
|
+
<small *ngIf="props.description" class="form-text text-muted">{{ props.description }}</small>
|
|
46
66
|
</div>
|
|
47
67
|
`,
|
|
48
68
|
}]
|
|
@@ -50,10 +70,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
50
70
|
|
|
51
71
|
class FormlyBootstrapFormFieldModule {
|
|
52
72
|
}
|
|
53
|
-
FormlyBootstrapFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
54
|
-
FormlyBootstrapFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
73
|
+
FormlyBootstrapFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
74
|
+
FormlyBootstrapFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule,
|
|
55
75
|
ReactiveFormsModule, i1.FormlyModule] });
|
|
56
|
-
FormlyBootstrapFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
76
|
+
FormlyBootstrapFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapFormFieldModule, imports: [[
|
|
57
77
|
CommonModule,
|
|
58
78
|
ReactiveFormsModule,
|
|
59
79
|
FormlyModule.forChild({
|
|
@@ -65,7 +85,7 @@ FormlyBootstrapFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "1
|
|
|
65
85
|
],
|
|
66
86
|
}),
|
|
67
87
|
]] });
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapFormFieldModule, decorators: [{
|
|
69
89
|
type: NgModule,
|
|
70
90
|
args: [{
|
|
71
91
|
declarations: [FormlyWrapperFormField],
|
|
@@ -84,9 +104,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
84
104
|
}]
|
|
85
105
|
}] });
|
|
86
106
|
|
|
107
|
+
class FieldType extends FieldType$1 {
|
|
108
|
+
constructor(hostContainerRef) {
|
|
109
|
+
super();
|
|
110
|
+
this.hostContainerRef = hostContainerRef;
|
|
111
|
+
}
|
|
112
|
+
set content(templateRef) {
|
|
113
|
+
if (templateRef && this.hostContainerRef) {
|
|
114
|
+
this.hostContainerRef.createEmbeddedView(templateRef);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
FieldType.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FieldType, deps: [{ token: i0.ViewContainerRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
119
|
+
FieldType.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FieldType, viewQueries: [{ propertyName: "content", first: true, predicate: ["fieldTypeTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FieldType, decorators: [{
|
|
121
|
+
type: Directive
|
|
122
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef, decorators: [{
|
|
123
|
+
type: Optional
|
|
124
|
+
}] }]; }, propDecorators: { content: [{
|
|
125
|
+
type: ViewChild,
|
|
126
|
+
args: ['fieldTypeTemplate', { static: true }]
|
|
127
|
+
}] } });
|
|
128
|
+
|
|
87
129
|
/**
|
|
88
130
|
* Generated bundle index. Do not edit.
|
|
89
131
|
*/
|
|
90
132
|
|
|
91
|
-
export { FormlyBootstrapFormFieldModule };
|
|
133
|
+
export { FieldType, FormlyBootstrapFormFieldModule };
|
|
92
134
|
//# sourceMappingURL=ngx-formly-bootstrap-form-field.mjs.map
|
|
@@ -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.module.ts","../../../../src/ui/bootstrap/form-field/src/ngx-formly-bootstrap-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-form-field',\n template: `\n <
|
|
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.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 <label *ngIf=\"props.label && props.hideLabel !== true\" [attr.for]=\"id\" class=\"form-label\">\n {{ props.label }}\n <span *ngIf=\"props.required && props.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n </label>\n </ng-template>\n\n <div class=\"mb-3\" [class.form-floating]=\"props.labelPosition === 'floating'\" [class.has-error]=\"showError\">\n <ng-container *ngIf=\"props.labelPosition !== 'floating'\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n </ng-container>\n\n <ng-template #fieldComponent></ng-template>\n\n <ng-container *ngIf=\"props.labelPosition === 'floating'\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n </ng-container>\n\n <div *ngIf=\"showError\" class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </div>\n\n <small *ngIf=\"props.description\" class=\"form-text text-muted\">{{ props.description }}</small>\n </div>\n `,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> {}\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';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyModule.forChild({\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n }),\n ],\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":["CoreFieldType"],"mappings":";;;;;;;;AAsCM,MAAO,sBAAuB,SAAQ,YAAiD,CAAA;;oHAAhF,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,EA3BvB,QAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,wBAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;4FAEU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBA7BlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAA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A;AACjE,QAAA,KAAK,EAAE,CAAC;QADsB,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAmB;KAElE;IARD,IAAsD,OAAO,CAAC,WAA6B,EAAA;AACzF,QAAA,IAAI,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACxC,YAAA,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;AACvD,SAAA;KACF;;uGALmB,SAAS,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAAT,SAAS,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;;0BAQK,QAAQ;4CANiC,OAAO,EAAA,CAAA;sBAA5D,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;ACLlD;;AAEG;;;;"}
|
|
@@ -3,57 +3,61 @@ import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3 from '@ngx-formly/core';
|
|
6
|
-
import {
|
|
6
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
8
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
9
|
+
import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
10
10
|
|
|
11
11
|
class FormlyFieldInput extends FieldType {
|
|
12
12
|
get type() {
|
|
13
|
-
return this.
|
|
13
|
+
return this.props.type || 'text';
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
FormlyFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
17
|
-
FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.
|
|
18
|
-
<
|
|
19
|
-
*ngIf="type !== 'number'; else numberTmp"
|
|
20
|
-
[type]="type"
|
|
21
|
-
[formControl]="formControl"
|
|
22
|
-
class="form-control"
|
|
23
|
-
[formlyAttributes]="field"
|
|
24
|
-
[class.is-invalid]="showError"
|
|
25
|
-
/>
|
|
26
|
-
<ng-template #numberTmp>
|
|
16
|
+
FormlyFieldInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormlyFieldInput, selector: "formly-field-input", usesInheritance: true, ngImport: i0, template: `
|
|
18
|
+
<ng-template #fieldTypeTemplate>
|
|
27
19
|
<input
|
|
28
|
-
|
|
20
|
+
*ngIf="type !== 'number'; else numberTmp"
|
|
21
|
+
[type]="type"
|
|
29
22
|
[formControl]="formControl"
|
|
30
23
|
class="form-control"
|
|
31
24
|
[formlyAttributes]="field"
|
|
32
25
|
[class.is-invalid]="showError"
|
|
33
26
|
/>
|
|
27
|
+
<ng-template #numberTmp>
|
|
28
|
+
<input
|
|
29
|
+
type="number"
|
|
30
|
+
[formControl]="formControl"
|
|
31
|
+
class="form-control"
|
|
32
|
+
[formlyAttributes]="field"
|
|
33
|
+
[class.is-invalid]="showError"
|
|
34
|
+
/>
|
|
35
|
+
</ng-template>
|
|
34
36
|
</ng-template>
|
|
35
37
|
`, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyFieldInput, decorators: [{
|
|
37
39
|
type: Component,
|
|
38
40
|
args: [{
|
|
39
41
|
selector: 'formly-field-input',
|
|
40
42
|
template: `
|
|
41
|
-
<
|
|
42
|
-
*ngIf="type !== 'number'; else numberTmp"
|
|
43
|
-
[type]="type"
|
|
44
|
-
[formControl]="formControl"
|
|
45
|
-
class="form-control"
|
|
46
|
-
[formlyAttributes]="field"
|
|
47
|
-
[class.is-invalid]="showError"
|
|
48
|
-
/>
|
|
49
|
-
<ng-template #numberTmp>
|
|
43
|
+
<ng-template #fieldTypeTemplate>
|
|
50
44
|
<input
|
|
51
|
-
|
|
45
|
+
*ngIf="type !== 'number'; else numberTmp"
|
|
46
|
+
[type]="type"
|
|
52
47
|
[formControl]="formControl"
|
|
53
48
|
class="form-control"
|
|
54
49
|
[formlyAttributes]="field"
|
|
55
50
|
[class.is-invalid]="showError"
|
|
56
51
|
/>
|
|
52
|
+
<ng-template #numberTmp>
|
|
53
|
+
<input
|
|
54
|
+
type="number"
|
|
55
|
+
[formControl]="formControl"
|
|
56
|
+
class="form-control"
|
|
57
|
+
[formlyAttributes]="field"
|
|
58
|
+
[class.is-invalid]="showError"
|
|
59
|
+
/>
|
|
60
|
+
</ng-template>
|
|
57
61
|
</ng-template>
|
|
58
62
|
`,
|
|
59
63
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -62,11 +66,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
62
66
|
|
|
63
67
|
class FormlyBootstrapInputModule {
|
|
64
68
|
}
|
|
65
|
-
FormlyBootstrapInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
66
|
-
FormlyBootstrapInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
69
|
+
FormlyBootstrapInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
70
|
+
FormlyBootstrapInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
|
|
67
71
|
ReactiveFormsModule,
|
|
68
72
|
FormlyBootstrapFormFieldModule, i3.FormlyModule] });
|
|
69
|
-
FormlyBootstrapInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
73
|
+
FormlyBootstrapInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapInputModule, imports: [[
|
|
70
74
|
CommonModule,
|
|
71
75
|
ReactiveFormsModule,
|
|
72
76
|
FormlyBootstrapFormFieldModule,
|
|
@@ -82,7 +86,7 @@ FormlyBootstrapInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
82
86
|
name: 'number',
|
|
83
87
|
extends: 'input',
|
|
84
88
|
defaultOptions: {
|
|
85
|
-
|
|
89
|
+
props: {
|
|
86
90
|
type: 'number',
|
|
87
91
|
},
|
|
88
92
|
},
|
|
@@ -91,7 +95,7 @@ FormlyBootstrapInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
91
95
|
name: 'integer',
|
|
92
96
|
extends: 'input',
|
|
93
97
|
defaultOptions: {
|
|
94
|
-
|
|
98
|
+
props: {
|
|
95
99
|
type: 'number',
|
|
96
100
|
},
|
|
97
101
|
},
|
|
@@ -99,7 +103,7 @@ FormlyBootstrapInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
99
103
|
],
|
|
100
104
|
}),
|
|
101
105
|
]] });
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormlyBootstrapInputModule, decorators: [{
|
|
103
107
|
type: NgModule,
|
|
104
108
|
args: [{
|
|
105
109
|
declarations: [FormlyFieldInput],
|
|
@@ -119,7 +123,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
119
123
|
name: 'number',
|
|
120
124
|
extends: 'input',
|
|
121
125
|
defaultOptions: {
|
|
122
|
-
|
|
126
|
+
props: {
|
|
123
127
|
type: 'number',
|
|
124
128
|
},
|
|
125
129
|
},
|
|
@@ -128,7 +132,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
128
132
|
name: 'integer',
|
|
129
133
|
extends: 'input',
|
|
130
134
|
defaultOptions: {
|
|
131
|
-
|
|
135
|
+
props: {
|
|
132
136
|
type: 'number',
|
|
133
137
|
},
|
|
134
138
|
},
|
|
@@ -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.module.ts","../../../../src/ui/bootstrap/input/src/ngx-formly-bootstrap-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-input.mjs","sources":["../../../../src/ui/bootstrap/input/src/input.type.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 <input\n *ngIf=\"type !== 'number'; else numberTmp\"\n [type]=\"type\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n />\n <ng-template #numberTmp>\n <input\n type=\"number\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n />\n </ng-template>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig<InputProps>> {\n get type() {\n return this.props.type || 'text';\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';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild({\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})\nexport class FormlyBootstrapInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAmCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAC1E,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC;KAClC;;8GAHU,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,EAvBjB,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;AAoBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EA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