@ngx-formly/bootstrap 5.10.22 → 6.0.0-next.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 +4 -2
- package/addons/addons.component.d.ts +3 -0
- package/addons/addons.module.d.ts +8 -0
- package/addons/ngx-formly-bootstrap-addons.d.ts +1 -2
- package/addons/package.json +6 -9
- package/checkbox/checkbox.module.d.ts +11 -0
- package/{lib/types/checkbox.d.ts → checkbox/checkbox.type.d.ts} +3 -0
- package/checkbox/ngx-formly-bootstrap-checkbox.d.ts +5 -0
- package/checkbox/package.json +10 -0
- package/checkbox/public_api.d.ts +2 -0
- package/esm2020/addons/addon.extension.mjs +9 -0
- package/esm2020/addons/addons.component.mjs +19 -0
- package/esm2020/addons/addons.module.mjs +36 -0
- package/esm2020/addons/ngx-formly-bootstrap-addons.mjs +5 -0
- package/esm2020/addons/public_api.mjs +2 -0
- package/esm2020/checkbox/checkbox.module.mjs +57 -0
- package/esm2020/checkbox/checkbox.type.mjs +73 -0
- package/esm2020/checkbox/ngx-formly-bootstrap-checkbox.mjs +5 -0
- package/esm2020/checkbox/public_api.mjs +3 -0
- package/esm2020/form-field/form-field.module.mjs +43 -0
- package/esm2020/form-field/form-field.wrapper.mjs +48 -0
- package/esm2020/form-field/ngx-formly-bootstrap-form-field.mjs +5 -0
- package/esm2020/form-field/public_api.mjs +2 -0
- package/esm2020/input/input.module.mjs +87 -0
- package/esm2020/input/input.type.mjs +58 -0
- package/esm2020/input/ngx-formly-bootstrap-input.mjs +5 -0
- package/esm2020/input/public_api.mjs +3 -0
- package/esm2020/lib/bootstrap.mjs +2 -0
- package/esm2020/lib/bootstrap.module.mjs +47 -0
- package/esm2020/multicheckbox/multicheckbox.module.mjs +53 -0
- package/esm2020/multicheckbox/multicheckbox.type.mjs +87 -0
- package/esm2020/multicheckbox/ngx-formly-bootstrap-multicheckbox.mjs +5 -0
- package/esm2020/multicheckbox/public_api.mjs +3 -0
- package/esm2020/ngx-formly-bootstrap.mjs +5 -0
- package/esm2020/public_api.mjs +5 -0
- package/esm2020/radio/ngx-formly-bootstrap-radio.mjs +5 -0
- package/esm2020/radio/public_api.mjs +3 -0
- package/esm2020/radio/radio.module.mjs +53 -0
- package/esm2020/radio/radio.type.mjs +73 -0
- package/esm2020/select/ngx-formly-bootstrap-select.mjs +5 -0
- package/esm2020/select/public_api.mjs +3 -0
- package/esm2020/select/select.module.mjs +55 -0
- package/esm2020/select/select.type.mjs +200 -0
- package/esm2020/textarea/ngx-formly-bootstrap-textarea.mjs +5 -0
- package/esm2020/textarea/public_api.mjs +3 -0
- package/esm2020/textarea/textarea.module.mjs +49 -0
- package/esm2020/textarea/textarea.type.mjs +47 -0
- package/fesm2015/ngx-formly-bootstrap-addons.mjs +68 -0
- package/fesm2015/ngx-formly-bootstrap-addons.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap-checkbox.mjs +132 -0
- package/fesm2015/ngx-formly-bootstrap-checkbox.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap-form-field.mjs +93 -0
- package/fesm2015/ngx-formly-bootstrap-form-field.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap-input.mjs +147 -0
- package/fesm2015/ngx-formly-bootstrap-input.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs +142 -0
- package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap-radio.mjs +128 -0
- package/fesm2015/ngx-formly-bootstrap-radio.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap-select.mjs +256 -0
- package/fesm2015/ngx-formly-bootstrap-select.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap-textarea.mjs +98 -0
- package/fesm2015/ngx-formly-bootstrap-textarea.mjs.map +1 -0
- package/fesm2015/ngx-formly-bootstrap.mjs +58 -0
- package/fesm2015/ngx-formly-bootstrap.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-addons.mjs +66 -0
- package/fesm2020/ngx-formly-bootstrap-addons.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-checkbox.mjs +132 -0
- package/fesm2020/ngx-formly-bootstrap-checkbox.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-form-field.mjs +93 -0
- package/fesm2020/ngx-formly-bootstrap-form-field.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-input.mjs +147 -0
- package/fesm2020/ngx-formly-bootstrap-input.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-multicheckbox.mjs +142 -0
- package/fesm2020/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-radio.mjs +128 -0
- package/fesm2020/ngx-formly-bootstrap-radio.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-select.mjs +256 -0
- package/fesm2020/ngx-formly-bootstrap-select.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap-textarea.mjs +98 -0
- package/fesm2020/ngx-formly-bootstrap-textarea.mjs.map +1 -0
- package/fesm2020/ngx-formly-bootstrap.mjs +58 -0
- package/fesm2020/ngx-formly-bootstrap.mjs.map +1 -0
- package/form-field/form-field.module.d.ts +10 -0
- package/form-field/form-field.wrapper.d.ts +6 -0
- package/form-field/ngx-formly-bootstrap-form-field.d.ts +5 -0
- package/form-field/package.json +10 -0
- package/form-field/public_api.d.ts +1 -0
- package/input/input.module.d.ts +11 -0
- package/input/input.type.d.ts +7 -0
- package/input/ngx-formly-bootstrap-input.d.ts +5 -0
- package/input/package.json +10 -0
- package/input/public_api.d.ts +2 -0
- package/lib/bootstrap.d.ts +0 -2
- package/lib/bootstrap.module.d.ts +12 -0
- package/multicheckbox/multicheckbox.module.d.ts +12 -0
- package/{lib/types/multicheckbox.d.ts → multicheckbox/multicheckbox.type.d.ts} +3 -0
- package/multicheckbox/ngx-formly-bootstrap-multicheckbox.d.ts +5 -0
- package/multicheckbox/package.json +10 -0
- package/multicheckbox/public_api.d.ts +2 -0
- package/ngx-formly-bootstrap.d.ts +1 -1
- package/package.json +94 -33
- package/radio/ngx-formly-bootstrap-radio.d.ts +5 -0
- package/radio/package.json +10 -0
- package/radio/public_api.d.ts +2 -0
- package/radio/radio.module.d.ts +12 -0
- package/{lib/types/radio.d.ts → radio/radio.type.d.ts} +3 -0
- package/select/ngx-formly-bootstrap-select.d.ts +5 -0
- package/select/package.json +10 -0
- package/select/public_api.d.ts +2 -0
- package/select/select.module.d.ts +12 -0
- package/{lib/types/select.d.ts → select/select.type.d.ts} +7 -1
- package/textarea/ngx-formly-bootstrap-textarea.d.ts +5 -0
- package/textarea/package.json +10 -0
- package/textarea/public_api.d.ts +2 -0
- package/textarea/textarea.module.d.ts +11 -0
- package/textarea/textarea.type.d.ts +12 -0
- package/addons/ngx-formly-bootstrap-addons.metadata.json +0 -1
- package/bundles/ngx-formly-bootstrap-addons.umd.js +0 -172
- package/bundles/ngx-formly-bootstrap-addons.umd.js.map +0 -1
- package/bundles/ngx-formly-bootstrap-addons.umd.min.js +0 -2
- package/bundles/ngx-formly-bootstrap-addons.umd.min.js.map +0 -1
- package/bundles/ngx-formly-bootstrap.umd.js +0 -460
- package/bundles/ngx-formly-bootstrap.umd.js.map +0 -1
- package/bundles/ngx-formly-bootstrap.umd.min.js +0 -2
- package/bundles/ngx-formly-bootstrap.umd.min.js.map +0 -1
- package/esm2015/addons/addon.extension.js +0 -17
- package/esm2015/addons/addons.component.js +0 -34
- package/esm2015/addons/addons.module.js +0 -30
- package/esm2015/addons/ngx-formly-bootstrap-addons.js +0 -11
- package/esm2015/addons/public_api.js +0 -6
- package/esm2015/lib/bootstrap.config.js +0 -57
- package/esm2015/lib/bootstrap.js +0 -8
- package/esm2015/lib/bootstrap.module.js +0 -28
- package/esm2015/lib/types/checkbox.js +0 -55
- package/esm2015/lib/types/input.js +0 -26
- package/esm2015/lib/types/multicheckbox.js +0 -87
- package/esm2015/lib/types/radio.js +0 -57
- package/esm2015/lib/types/select.js +0 -146
- package/esm2015/lib/types/textarea.js +0 -33
- package/esm2015/lib/types/types.js +0 -11
- package/esm2015/lib/wrappers/form-field.wrapper.js +0 -30
- package/esm2015/lib/wrappers/wrappers.js +0 -6
- package/esm2015/ngx-formly-bootstrap.js +0 -10
- package/esm2015/public_api.js +0 -9
- package/esm5/addons/addon.extension.js +0 -18
- package/esm5/addons/addons.component.js +0 -49
- package/esm5/addons/addons.module.js +0 -34
- package/esm5/addons/ngx-formly-bootstrap-addons.js +0 -11
- package/esm5/addons/public_api.js +0 -6
- package/esm5/lib/bootstrap.config.js +0 -57
- package/esm5/lib/bootstrap.js +0 -8
- package/esm5/lib/bootstrap.module.js +0 -32
- package/esm5/lib/types/checkbox.js +0 -34
- package/esm5/lib/types/input.js +0 -32
- package/esm5/lib/types/multicheckbox.js +0 -73
- package/esm5/lib/types/radio.js +0 -33
- package/esm5/lib/types/select.js +0 -95
- package/esm5/lib/types/textarea.js +0 -33
- package/esm5/lib/types/types.js +0 -11
- package/esm5/lib/wrappers/form-field.wrapper.js +0 -22
- package/esm5/lib/wrappers/wrappers.js +0 -6
- package/esm5/ngx-formly-bootstrap.js +0 -10
- package/esm5/public_api.js +0 -9
- package/fesm2015/ngx-formly-bootstrap-addons.js +0 -91
- package/fesm2015/ngx-formly-bootstrap-addons.js.map +0 -1
- package/fesm2015/ngx-formly-bootstrap.js +0 -505
- package/fesm2015/ngx-formly-bootstrap.js.map +0 -1
- package/fesm5/ngx-formly-bootstrap-addons.js +0 -108
- package/fesm5/ngx-formly-bootstrap-addons.js.map +0 -1
- package/fesm5/ngx-formly-bootstrap.js +0 -383
- package/fesm5/ngx-formly-bootstrap.js.map +0 -1
- package/lib/bootstrap.config.d.ts +0 -5
- package/lib/types/input.d.ts +0 -4
- package/lib/types/textarea.d.ts +0 -9
- package/lib/types/types.d.ts +0 -6
- package/lib/wrappers/form-field.wrapper.d.ts +0 -3
- package/lib/wrappers/wrappers.d.ts +0 -1
- package/ngx-formly-bootstrap.metadata.json +0 -1
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
import { SelectControlValueAccessor, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i3 from '@ngx-formly/core';
|
|
8
|
+
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
|
9
|
+
import * as i4 from '@ngx-formly/core/select';
|
|
10
|
+
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
11
|
+
import { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
12
|
+
import { take } from 'rxjs/operators';
|
|
13
|
+
|
|
14
|
+
class FormlyFieldSelect extends FieldType {
|
|
15
|
+
constructor(ngZone) {
|
|
16
|
+
super();
|
|
17
|
+
this.ngZone = ngZone;
|
|
18
|
+
this.defaultOptions = {
|
|
19
|
+
templateOptions: {
|
|
20
|
+
options: [],
|
|
21
|
+
compareWith(o1, o2) {
|
|
22
|
+
return o1 === o2;
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
// workaround for https://github.com/angular/angular/issues/10010
|
|
28
|
+
/**
|
|
29
|
+
* TODO: Check if this is still needed
|
|
30
|
+
*/
|
|
31
|
+
set selectAccessor(s) {
|
|
32
|
+
if (!s) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const writeValue = s.writeValue.bind(s);
|
|
36
|
+
if (s._getOptionId(s.value) === null) {
|
|
37
|
+
writeValue(s.value);
|
|
38
|
+
}
|
|
39
|
+
s.writeValue = (value) => {
|
|
40
|
+
const id = s._idCounter;
|
|
41
|
+
writeValue(value);
|
|
42
|
+
if (value === null) {
|
|
43
|
+
this.ngZone.onStable
|
|
44
|
+
.asObservable()
|
|
45
|
+
.pipe(take(1))
|
|
46
|
+
.subscribe(() => {
|
|
47
|
+
if (id !== s._idCounter &&
|
|
48
|
+
s._getOptionId(value) === null &&
|
|
49
|
+
s._elementRef.nativeElement.selectedIndex !== -1) {
|
|
50
|
+
writeValue(value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldSelect, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
+
FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: FormlyFieldSelect, selector: "formly-field-select", viewQueries: [{ propertyName: "selectAccessor", first: true, predicate: SelectControlValueAccessor, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
59
|
+
<select
|
|
60
|
+
*ngIf="to.multiple; else singleSelect"
|
|
61
|
+
class="form-select"
|
|
62
|
+
multiple
|
|
63
|
+
[formControl]="formControl"
|
|
64
|
+
[compareWith]="to.compareWith"
|
|
65
|
+
[class.is-invalid]="showError"
|
|
66
|
+
[formlyAttributes]="field"
|
|
67
|
+
>
|
|
68
|
+
<ng-container *ngIf="to.options | formlySelectOptions: field | async as opts">
|
|
69
|
+
<ng-container *ngIf="to._flatOptions; else grouplist">
|
|
70
|
+
<ng-container *ngFor="let opt of opts">
|
|
71
|
+
<option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>
|
|
72
|
+
</ng-container>
|
|
73
|
+
</ng-container>
|
|
74
|
+
|
|
75
|
+
<ng-template #grouplist>
|
|
76
|
+
<ng-container *ngFor="let opt of opts">
|
|
77
|
+
<option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
|
|
78
|
+
{{ opt.label }}
|
|
79
|
+
</option>
|
|
80
|
+
<ng-template #optgroup>
|
|
81
|
+
<optgroup [label]="opt.label">
|
|
82
|
+
<option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
|
|
83
|
+
{{ child.label }}
|
|
84
|
+
</option>
|
|
85
|
+
</optgroup>
|
|
86
|
+
</ng-template>
|
|
87
|
+
</ng-container>
|
|
88
|
+
</ng-template>
|
|
89
|
+
</ng-container>
|
|
90
|
+
</select>
|
|
91
|
+
|
|
92
|
+
<ng-template #singleSelect>
|
|
93
|
+
<select
|
|
94
|
+
class="form-select"
|
|
95
|
+
[formControl]="formControl"
|
|
96
|
+
[compareWith]="to.compareWith"
|
|
97
|
+
[class.is-invalid]="showError"
|
|
98
|
+
[formlyAttributes]="field"
|
|
99
|
+
>
|
|
100
|
+
<option *ngIf="to.placeholder" [ngValue]="undefined">{{ to.placeholder }}</option>
|
|
101
|
+
<ng-container *ngIf="to.options | formlySelectOptions: field | async as opts">
|
|
102
|
+
<ng-container *ngIf="to._flatOptions; else grouplist">
|
|
103
|
+
<ng-container *ngFor="let opt of opts">
|
|
104
|
+
<option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>
|
|
105
|
+
</ng-container>
|
|
106
|
+
</ng-container>
|
|
107
|
+
|
|
108
|
+
<ng-template #grouplist>
|
|
109
|
+
<ng-container *ngFor="let opt of opts">
|
|
110
|
+
<option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
|
|
111
|
+
{{ opt.label }}
|
|
112
|
+
</option>
|
|
113
|
+
<ng-template #optgroup>
|
|
114
|
+
<optgroup [label]="opt.label">
|
|
115
|
+
<option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
|
|
116
|
+
{{ child.label }}
|
|
117
|
+
</option>
|
|
118
|
+
</optgroup>
|
|
119
|
+
</ng-template>
|
|
120
|
+
</ng-container>
|
|
121
|
+
</ng-template>
|
|
122
|
+
</ng-container>
|
|
123
|
+
</select>
|
|
124
|
+
</ng-template>
|
|
125
|
+
`, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }], pipes: { "async": i1.AsyncPipe, "formlySelectOptions": i4.ɵFormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
|
127
|
+
type: Component,
|
|
128
|
+
args: [{
|
|
129
|
+
selector: 'formly-field-select',
|
|
130
|
+
template: `
|
|
131
|
+
<select
|
|
132
|
+
*ngIf="to.multiple; else singleSelect"
|
|
133
|
+
class="form-select"
|
|
134
|
+
multiple
|
|
135
|
+
[formControl]="formControl"
|
|
136
|
+
[compareWith]="to.compareWith"
|
|
137
|
+
[class.is-invalid]="showError"
|
|
138
|
+
[formlyAttributes]="field"
|
|
139
|
+
>
|
|
140
|
+
<ng-container *ngIf="to.options | formlySelectOptions: field | async as opts">
|
|
141
|
+
<ng-container *ngIf="to._flatOptions; else grouplist">
|
|
142
|
+
<ng-container *ngFor="let opt of opts">
|
|
143
|
+
<option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>
|
|
144
|
+
</ng-container>
|
|
145
|
+
</ng-container>
|
|
146
|
+
|
|
147
|
+
<ng-template #grouplist>
|
|
148
|
+
<ng-container *ngFor="let opt of opts">
|
|
149
|
+
<option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
|
|
150
|
+
{{ opt.label }}
|
|
151
|
+
</option>
|
|
152
|
+
<ng-template #optgroup>
|
|
153
|
+
<optgroup [label]="opt.label">
|
|
154
|
+
<option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
|
|
155
|
+
{{ child.label }}
|
|
156
|
+
</option>
|
|
157
|
+
</optgroup>
|
|
158
|
+
</ng-template>
|
|
159
|
+
</ng-container>
|
|
160
|
+
</ng-template>
|
|
161
|
+
</ng-container>
|
|
162
|
+
</select>
|
|
163
|
+
|
|
164
|
+
<ng-template #singleSelect>
|
|
165
|
+
<select
|
|
166
|
+
class="form-select"
|
|
167
|
+
[formControl]="formControl"
|
|
168
|
+
[compareWith]="to.compareWith"
|
|
169
|
+
[class.is-invalid]="showError"
|
|
170
|
+
[formlyAttributes]="field"
|
|
171
|
+
>
|
|
172
|
+
<option *ngIf="to.placeholder" [ngValue]="undefined">{{ to.placeholder }}</option>
|
|
173
|
+
<ng-container *ngIf="to.options | formlySelectOptions: field | async as opts">
|
|
174
|
+
<ng-container *ngIf="to._flatOptions; else grouplist">
|
|
175
|
+
<ng-container *ngFor="let opt of opts">
|
|
176
|
+
<option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>
|
|
177
|
+
</ng-container>
|
|
178
|
+
</ng-container>
|
|
179
|
+
|
|
180
|
+
<ng-template #grouplist>
|
|
181
|
+
<ng-container *ngFor="let opt of opts">
|
|
182
|
+
<option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
|
|
183
|
+
{{ opt.label }}
|
|
184
|
+
</option>
|
|
185
|
+
<ng-template #optgroup>
|
|
186
|
+
<optgroup [label]="opt.label">
|
|
187
|
+
<option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
|
|
188
|
+
{{ child.label }}
|
|
189
|
+
</option>
|
|
190
|
+
</optgroup>
|
|
191
|
+
</ng-template>
|
|
192
|
+
</ng-container>
|
|
193
|
+
</ng-template>
|
|
194
|
+
</ng-container>
|
|
195
|
+
</select>
|
|
196
|
+
</ng-template>
|
|
197
|
+
`,
|
|
198
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
199
|
+
}]
|
|
200
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { selectAccessor: [{
|
|
201
|
+
type: ViewChild,
|
|
202
|
+
args: [SelectControlValueAccessor]
|
|
203
|
+
}] } });
|
|
204
|
+
|
|
205
|
+
class FormlyBootstrapSelectModule {
|
|
206
|
+
}
|
|
207
|
+
FormlyBootstrapSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
208
|
+
FormlyBootstrapSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapSelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
|
|
209
|
+
ReactiveFormsModule,
|
|
210
|
+
FormlyBootstrapFormFieldModule,
|
|
211
|
+
FormlySelectModule, i3.FormlyModule] });
|
|
212
|
+
FormlyBootstrapSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapSelectModule, imports: [[
|
|
213
|
+
CommonModule,
|
|
214
|
+
ReactiveFormsModule,
|
|
215
|
+
FormlyBootstrapFormFieldModule,
|
|
216
|
+
FormlySelectModule,
|
|
217
|
+
FormlyModule.forChild({
|
|
218
|
+
types: [
|
|
219
|
+
{
|
|
220
|
+
name: 'select',
|
|
221
|
+
component: FormlyFieldSelect,
|
|
222
|
+
wrappers: ['form-field'],
|
|
223
|
+
},
|
|
224
|
+
{ name: 'enum', extends: 'select' },
|
|
225
|
+
],
|
|
226
|
+
}),
|
|
227
|
+
]] });
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapSelectModule, decorators: [{
|
|
229
|
+
type: NgModule,
|
|
230
|
+
args: [{
|
|
231
|
+
declarations: [FormlyFieldSelect],
|
|
232
|
+
imports: [
|
|
233
|
+
CommonModule,
|
|
234
|
+
ReactiveFormsModule,
|
|
235
|
+
FormlyBootstrapFormFieldModule,
|
|
236
|
+
FormlySelectModule,
|
|
237
|
+
FormlyModule.forChild({
|
|
238
|
+
types: [
|
|
239
|
+
{
|
|
240
|
+
name: 'select',
|
|
241
|
+
component: FormlyFieldSelect,
|
|
242
|
+
wrappers: ['form-field'],
|
|
243
|
+
},
|
|
244
|
+
{ name: 'enum', extends: 'select' },
|
|
245
|
+
],
|
|
246
|
+
}),
|
|
247
|
+
],
|
|
248
|
+
}]
|
|
249
|
+
}] });
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Generated bundle index. Do not edit.
|
|
253
|
+
*/
|
|
254
|
+
|
|
255
|
+
export { FormlyBootstrapSelectModule, FormlyFieldSelect };
|
|
256
|
+
//# sourceMappingURL=ngx-formly-bootstrap-select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-select.mjs","sources":["../../../../src/ui/bootstrap/select/src/select.type.ts","../../../../src/ui/bootstrap/select/src/select.module.ts","../../../../src/ui/bootstrap/select/src/ngx-formly-bootstrap-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, NgZone } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldType } from '@ngx-formly/core';\nimport { take } from 'rxjs/operators';\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <select\n *ngIf=\"to.multiple; else singleSelect\"\n class=\"form-select\"\n multiple\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n <ng-container *ngIf=\"to.options | formlySelectOptions: field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions; else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group; else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">\n {{ opt.label }}\n </option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n\n <ng-template #singleSelect>\n <select\n class=\"form-select\"\n [formControl]=\"formControl\"\n [compareWith]=\"to.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n <option *ngIf=\"to.placeholder\" [ngValue]=\"undefined\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions: field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions; else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group; else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">\n {{ opt.label }}\n </option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n // workaround for https://github.com/angular/angular/issues/10010\n /**\n * TODO: Check if this is still needed\n */\n @ViewChild(SelectControlValueAccessor) set selectAccessor(s: any) {\n if (!s) {\n return;\n }\n\n const writeValue = s.writeValue.bind(s);\n if (s._getOptionId(s.value) === null) {\n writeValue(s.value);\n }\n\n s.writeValue = (value: any) => {\n const id = s._idCounter;\n writeValue(value);\n if (value === null) {\n this.ngZone.onStable\n .asObservable()\n .pipe(take(1))\n .subscribe(() => {\n if (\n id !== s._idCounter &&\n s._getOptionId(value) === null &&\n s._elementRef.nativeElement.selectedIndex !== -1\n ) {\n writeValue(value);\n }\n });\n }\n };\n }\n\n constructor(private ngZone: NgZone) {\n super();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldSelect } from './select.type';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MA6Ea,0BAA0B,SAAS;IA4C9C,YAAoB,MAAc;QAChC,KAAK,EAAE,CAAC;QADU,WAAM,GAAN,MAAM,CAAQ;QA3ClC,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,OAAO,EAAE,EAAE;gBACX,WAAW,CAAC,EAAO,EAAE,EAAO;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;iBAClB;aACF;SACF,CAAC;KAsCD;;;;;IAhCD,IAA2C,cAAc,CAAC,CAAM;QAC9D,IAAI,CAAC,CAAC,EAAE;YACN,OAAO;SACR;QAED,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;YACpC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACrB;QAED,CAAC,CAAC,UAAU,GAAG,CAAC,KAAU;YACxB,MAAM,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC;YACxB,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,IAAI,KAAK,KAAK,IAAI,EAAE;gBAClB,IAAI,CAAC,MAAM,CAAC,QAAQ;qBACjB,YAAY,EAAE;qBACd,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;qBACb,SAAS,CAAC;oBACT,IACE,EAAE,KAAK,CAAC,CAAC,UAAU;wBACnB,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,IAAI;wBAC9B,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,aAAa,KAAK,CAAC,CAAC,EAChD;wBACA,UAAU,CAAC,KAAK,CAAC,CAAC;qBACnB;iBACF,CAAC,CAAC;aACN;SACF,CAAC;KACH;;8GA1CU,iBAAiB;kGAAjB,iBAAiB,2GAcjB,0BAA0B,uEApF3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmET;2FAGU,iBAAiB;kBAxE7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,qBAAqB;oBAC/B,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmET;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;6FAe4C,cAAc;sBAAxD,SAAS;uBAAC,0BAA0B;;;MC9D1B,2BAA2B;;wHAA3B,2BAA2B;yHAA3B,2BAA2B,iBAnBvB,iBAAiB,aAE9B,YAAY;QACZ,mBAAmB;QAEnB,8BAA8B;QAC9B,kBAAkB;yHAaT,2BAA2B,YAlB7B;YACP,YAAY;YACZ,mBAAmB;YAEnB,8BAA8B;YAC9B,kBAAkB;YAClB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;oBACD,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;iBACpC;aACF,CAAC;SACH;2FAEU,2BAA2B;kBApBvC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,QAAQ;oCACd,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;gCACD,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;6BACpC;yBACF,CAAC;qBACH;iBACF;;;AC5BD;;;;;;"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i2 from '@ngx-formly/core';
|
|
5
|
+
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
|
6
|
+
import * as i1 from '@angular/forms';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
9
|
+
|
|
10
|
+
class FormlyFieldTextArea extends FieldType {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.defaultOptions = {
|
|
14
|
+
templateOptions: {
|
|
15
|
+
cols: 1,
|
|
16
|
+
rows: 1,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: FormlyFieldTextArea, selector: "formly-field-textarea", usesInheritance: true, ngImport: i0, template: `
|
|
23
|
+
<textarea
|
|
24
|
+
[formControl]="formControl"
|
|
25
|
+
[cols]="to.cols"
|
|
26
|
+
[rows]="to.rows"
|
|
27
|
+
class="form-control"
|
|
28
|
+
[class.is-invalid]="showError"
|
|
29
|
+
[formlyAttributes]="field"
|
|
30
|
+
>
|
|
31
|
+
</textarea>
|
|
32
|
+
`, isInline: true, directives: [{ 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]" }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
|
|
34
|
+
type: Component,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: 'formly-field-textarea',
|
|
37
|
+
template: `
|
|
38
|
+
<textarea
|
|
39
|
+
[formControl]="formControl"
|
|
40
|
+
[cols]="to.cols"
|
|
41
|
+
[rows]="to.rows"
|
|
42
|
+
class="form-control"
|
|
43
|
+
[class.is-invalid]="showError"
|
|
44
|
+
[formlyAttributes]="field"
|
|
45
|
+
>
|
|
46
|
+
</textarea>
|
|
47
|
+
`,
|
|
48
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
49
|
+
}]
|
|
50
|
+
}] });
|
|
51
|
+
|
|
52
|
+
class FormlyBootstrapTextAreaModule {
|
|
53
|
+
}
|
|
54
|
+
FormlyBootstrapTextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
55
|
+
FormlyBootstrapTextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule,
|
|
56
|
+
ReactiveFormsModule,
|
|
57
|
+
FormlyBootstrapFormFieldModule, i2.FormlyModule] });
|
|
58
|
+
FormlyBootstrapTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapTextAreaModule, imports: [[
|
|
59
|
+
CommonModule,
|
|
60
|
+
ReactiveFormsModule,
|
|
61
|
+
FormlyBootstrapFormFieldModule,
|
|
62
|
+
FormlyModule.forChild({
|
|
63
|
+
types: [
|
|
64
|
+
{
|
|
65
|
+
name: 'textarea',
|
|
66
|
+
component: FormlyFieldTextArea,
|
|
67
|
+
wrappers: ['form-field'],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
}),
|
|
71
|
+
]] });
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapTextAreaModule, decorators: [{
|
|
73
|
+
type: NgModule,
|
|
74
|
+
args: [{
|
|
75
|
+
declarations: [FormlyFieldTextArea],
|
|
76
|
+
imports: [
|
|
77
|
+
CommonModule,
|
|
78
|
+
ReactiveFormsModule,
|
|
79
|
+
FormlyBootstrapFormFieldModule,
|
|
80
|
+
FormlyModule.forChild({
|
|
81
|
+
types: [
|
|
82
|
+
{
|
|
83
|
+
name: 'textarea',
|
|
84
|
+
component: FormlyFieldTextArea,
|
|
85
|
+
wrappers: ['form-field'],
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
}),
|
|
89
|
+
],
|
|
90
|
+
}]
|
|
91
|
+
}] });
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Generated bundle index. Do not edit.
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
export { FormlyBootstrapTextAreaModule, FormlyFieldTextArea };
|
|
98
|
+
//# sourceMappingURL=ngx-formly-bootstrap-textarea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-textarea.mjs","sources":["../../../../src/ui/bootstrap/textarea/src/textarea.type.ts","../../../../src/ui/bootstrap/textarea/src/textarea.module.ts","../../../../src/ui/bootstrap/textarea/src/ngx-formly-bootstrap-textarea.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <textarea\n [formControl]=\"formControl\"\n [cols]=\"to.cols\"\n [rows]=\"to.rows\"\n class=\"form-control\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n </textarea>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldTextArea extends FieldType {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\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';\nimport { FormlyFieldTextArea } from './textarea.type';\n\n@NgModule({\n declarations: [FormlyFieldTextArea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,4BAA4B,SAAS;IAflD;;QAgBE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,CAAC;aACR;SACF,CAAC;KACH;;gHAPY,mBAAmB;oGAAnB,mBAAmB,oFAbpB;;;;;;;;;;GAUT;2FAGU,mBAAmB;kBAf/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,uBAAuB;oBACjC,QAAQ,EAAE;;;;;;;;;;GAUT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;;MCSY,6BAA6B;;0HAA7B,6BAA6B;2HAA7B,6BAA6B,iBAjBzB,mBAAmB,aAEhC,YAAY;QACZ,mBAAmB;QAEnB,8BAA8B;2HAYrB,6BAA6B,YAhB/B;YACP,YAAY;YACZ,mBAAmB;YAEnB,8BAA8B;YAC9B,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,UAAU;wBAChB,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,6BAA6B;kBAlBzC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,UAAU;oCAChB,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;ACzBD;;;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
4
|
+
import { FormlyBootstrapInputModule } from '@ngx-formly/bootstrap/input';
|
|
5
|
+
import { FormlyBootstrapTextAreaModule } from '@ngx-formly/bootstrap/textarea';
|
|
6
|
+
import { FormlyBootstrapRadioModule } from '@ngx-formly/bootstrap/radio';
|
|
7
|
+
import { FormlyBootstrapCheckboxModule } from '@ngx-formly/bootstrap/checkbox';
|
|
8
|
+
import { FormlyBootstrapMultiCheckboxModule } from '@ngx-formly/bootstrap/multicheckbox';
|
|
9
|
+
import { FormlyBootstrapSelectModule } from '@ngx-formly/bootstrap/select';
|
|
10
|
+
import { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';
|
|
11
|
+
|
|
12
|
+
class FormlyBootstrapModule {
|
|
13
|
+
}
|
|
14
|
+
FormlyBootstrapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15
|
+
FormlyBootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapModule, imports: [FormlyBootstrapFormFieldModule,
|
|
16
|
+
FormlyBootstrapInputModule,
|
|
17
|
+
FormlyBootstrapTextAreaModule,
|
|
18
|
+
FormlyBootstrapRadioModule,
|
|
19
|
+
FormlyBootstrapCheckboxModule,
|
|
20
|
+
FormlyBootstrapMultiCheckboxModule,
|
|
21
|
+
FormlyBootstrapSelectModule,
|
|
22
|
+
FormlyBootstrapAddonsModule] });
|
|
23
|
+
FormlyBootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapModule, imports: [[
|
|
24
|
+
FormlyBootstrapFormFieldModule,
|
|
25
|
+
FormlyBootstrapInputModule,
|
|
26
|
+
FormlyBootstrapTextAreaModule,
|
|
27
|
+
FormlyBootstrapRadioModule,
|
|
28
|
+
FormlyBootstrapCheckboxModule,
|
|
29
|
+
FormlyBootstrapMultiCheckboxModule,
|
|
30
|
+
FormlyBootstrapSelectModule,
|
|
31
|
+
FormlyBootstrapAddonsModule,
|
|
32
|
+
]] });
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapModule, decorators: [{
|
|
34
|
+
type: NgModule,
|
|
35
|
+
args: [{
|
|
36
|
+
imports: [
|
|
37
|
+
FormlyBootstrapFormFieldModule,
|
|
38
|
+
FormlyBootstrapInputModule,
|
|
39
|
+
FormlyBootstrapTextAreaModule,
|
|
40
|
+
FormlyBootstrapRadioModule,
|
|
41
|
+
FormlyBootstrapCheckboxModule,
|
|
42
|
+
FormlyBootstrapMultiCheckboxModule,
|
|
43
|
+
FormlyBootstrapSelectModule,
|
|
44
|
+
FormlyBootstrapAddonsModule,
|
|
45
|
+
],
|
|
46
|
+
}]
|
|
47
|
+
}] });
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* Public API Surface of bootstrap
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Generated bundle index. Do not edit.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
export { FormlyBootstrapModule };
|
|
58
|
+
//# sourceMappingURL=ngx-formly-bootstrap.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap.mjs","sources":["../../../../src/ui/bootstrap/src/lib/bootstrap.module.ts","../../../../src/ui/bootstrap/src/public_api.ts","../../../../src/ui/bootstrap/src/ngx-formly-bootstrap.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyBootstrapInputModule } from '@ngx-formly/bootstrap/input';\nimport { FormlyBootstrapTextAreaModule } from '@ngx-formly/bootstrap/textarea';\nimport { FormlyBootstrapRadioModule } from '@ngx-formly/bootstrap/radio';\nimport { FormlyBootstrapCheckboxModule } from '@ngx-formly/bootstrap/checkbox';\nimport { FormlyBootstrapMultiCheckboxModule } from '@ngx-formly/bootstrap/multicheckbox';\nimport { FormlyBootstrapSelectModule } from '@ngx-formly/bootstrap/select';\nimport { FormlyBootstrapAddonsModule } from '@ngx-formly/bootstrap/addons';\n\n@NgModule({\n imports: [\n FormlyBootstrapFormFieldModule,\n FormlyBootstrapInputModule,\n FormlyBootstrapTextAreaModule,\n FormlyBootstrapRadioModule,\n FormlyBootstrapCheckboxModule,\n FormlyBootstrapMultiCheckboxModule,\n FormlyBootstrapSelectModule,\n FormlyBootstrapAddonsModule,\n ],\n})\nexport class FormlyBootstrapModule {}\n","/*\n * Public API Surface of bootstrap\n */\n\nexport * from './lib/bootstrap';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,qBAAqB;;kHAArB,qBAAqB;mHAArB,qBAAqB,YAV9B,8BAA8B;QAC9B,0BAA0B;QAC1B,6BAA6B;QAC7B,0BAA0B;QAC1B,6BAA6B;QAC7B,kCAAkC;QAClC,2BAA2B;QAC3B,2BAA2B;mHAGlB,qBAAqB,YAXvB;YACP,8BAA8B;YAC9B,0BAA0B;YAC1B,6BAA6B;YAC7B,0BAA0B;YAC1B,6BAA6B;YAC7B,kCAAkC;YAClC,2BAA2B;YAC3B,2BAA2B;SAC5B;2FAEU,qBAAqB;kBAZjC,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,8BAA8B;wBAC9B,0BAA0B;wBAC1B,6BAA6B;wBAC7B,0BAA0B;wBAC1B,6BAA6B;wBAC7B,kCAAkC;wBAClC,2BAA2B;wBAC3B,2BAA2B;qBAC5B;iBACF;;;ACtBD;;;;ACAA;;;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1$1 from '@ngx-formly/core';
|
|
6
|
+
import { FieldWrapper, FormlyModule } from '@ngx-formly/core';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
|
|
9
|
+
class FormlyWrapperAddons extends FieldWrapper {
|
|
10
|
+
addonRightClick($event) {
|
|
11
|
+
this.to.addonRight.onClick?.(this.field, $event);
|
|
12
|
+
}
|
|
13
|
+
addonLeftClick($event) {
|
|
14
|
+
this.to.addonLeft.onClick?.(this.field, $event);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
FormlyWrapperAddons.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyWrapperAddons, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
FormlyWrapperAddons.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: FormlyWrapperAddons, selector: "formly-wrapper-addons", usesInheritance: true, ngImport: i0, template: "<div class=\"input-group\" [class.has-validation]=\"showError\">\n <div\n class=\"input-group-text\"\n *ngIf=\"to.addonLeft\"\n [ngStyle]=\"{ cursor: to.addonLeft.onClick ? 'pointer' : 'inherit' }\"\n (click)=\"addonLeftClick($event)\"\n >\n <i [ngClass]=\"to.addonLeft.class\" *ngIf=\"to.addonLeft.class\"></i>\n <span *ngIf=\"to.addonLeft.text\">{{ to.addonLeft.text }}</span>\n </div>\n <div class=\"input-addons\">\n <ng-container #fieldComponent></ng-container>\n </div>\n <div\n class=\"input-group-text\"\n *ngIf=\"to.addonRight\"\n [ngStyle]=\"{ cursor: to.addonRight.onClick ? 'pointer' : 'inherit' }\"\n (click)=\"addonRightClick($event)\"\n >\n <i [ngClass]=\"to.addonRight.class\" *ngIf=\"to.addonRight.class\"></i>\n <span *ngIf=\"to.addonRight.text\">{{ to.addonRight.text }}</span>\n </div>\n</div>\n", styles: [":host ::ng-deep .input-group>:not(:first-child) .form-control{border-top-left-radius:0;border-bottom-left-radius:0}:host ::ng-deep .input-group>:not(:last-child) .form-control{border-top-right-radius:0;border-bottom-right-radius:0}:host ::ng-deep .input-group>.input-addons{position:relative;flex:1 1 auto;width:1%;margin-bottom:0}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyWrapperAddons, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{ selector: 'formly-wrapper-addons', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"input-group\" [class.has-validation]=\"showError\">\n <div\n class=\"input-group-text\"\n *ngIf=\"to.addonLeft\"\n [ngStyle]=\"{ cursor: to.addonLeft.onClick ? 'pointer' : 'inherit' }\"\n (click)=\"addonLeftClick($event)\"\n >\n <i [ngClass]=\"to.addonLeft.class\" *ngIf=\"to.addonLeft.class\"></i>\n <span *ngIf=\"to.addonLeft.text\">{{ to.addonLeft.text }}</span>\n </div>\n <div class=\"input-addons\">\n <ng-container #fieldComponent></ng-container>\n </div>\n <div\n class=\"input-group-text\"\n *ngIf=\"to.addonRight\"\n [ngStyle]=\"{ cursor: to.addonRight.onClick ? 'pointer' : 'inherit' }\"\n (click)=\"addonRightClick($event)\"\n >\n <i [ngClass]=\"to.addonRight.class\" *ngIf=\"to.addonRight.class\"></i>\n <span *ngIf=\"to.addonRight.text\">{{ to.addonRight.text }}</span>\n </div>\n</div>\n", styles: [":host ::ng-deep .input-group>:not(:first-child) .form-control{border-top-left-radius:0;border-bottom-left-radius:0}:host ::ng-deep .input-group>:not(:last-child) .form-control{border-top-right-radius:0;border-bottom-right-radius:0}:host ::ng-deep .input-group>.input-addons{position:relative;flex:1 1 auto;width:1%;margin-bottom:0}\n"] }]
|
|
22
|
+
}] });
|
|
23
|
+
|
|
24
|
+
function addonsExtension(field) {
|
|
25
|
+
if (!field.templateOptions || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (field.templateOptions.addonLeft || field.templateOptions.addonRight) {
|
|
29
|
+
field.wrappers = [...(field.wrappers || []), 'addons'];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
class FormlyBootstrapAddonsModule {
|
|
34
|
+
}
|
|
35
|
+
FormlyBootstrapAddonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
36
|
+
FormlyBootstrapAddonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapAddonsModule, declarations: [FormlyWrapperAddons], imports: [CommonModule,
|
|
37
|
+
ReactiveFormsModule, i1$1.FormlyModule] });
|
|
38
|
+
FormlyBootstrapAddonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapAddonsModule, imports: [[
|
|
39
|
+
CommonModule,
|
|
40
|
+
ReactiveFormsModule,
|
|
41
|
+
FormlyModule.forChild({
|
|
42
|
+
wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],
|
|
43
|
+
extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],
|
|
44
|
+
}),
|
|
45
|
+
]] });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyBootstrapAddonsModule, decorators: [{
|
|
47
|
+
type: NgModule,
|
|
48
|
+
args: [{
|
|
49
|
+
declarations: [FormlyWrapperAddons],
|
|
50
|
+
imports: [
|
|
51
|
+
CommonModule,
|
|
52
|
+
ReactiveFormsModule,
|
|
53
|
+
FormlyModule.forChild({
|
|
54
|
+
wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],
|
|
55
|
+
extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],
|
|
56
|
+
}),
|
|
57
|
+
],
|
|
58
|
+
}]
|
|
59
|
+
}] });
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Generated bundle index. Do not edit.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
export { FormlyBootstrapAddonsModule };
|
|
66
|
+
//# sourceMappingURL=ngx-formly-bootstrap-addons.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-addons.mjs","sources":["../../../../src/ui/bootstrap/addons/src/addons.component.ts","../../../../src/ui/bootstrap/addons/src/addons.component.html","../../../../src/ui/bootstrap/addons/src/addon.extension.ts","../../../../src/ui/bootstrap/addons/src/addons.module.ts","../../../../src/ui/bootstrap/addons/src/ngx-formly-bootstrap-addons.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-wrapper-addons',\n templateUrl: './addons.component.html',\n styleUrls: ['./addons.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyWrapperAddons extends FieldWrapper {\n addonRightClick($event: any) {\n this.to.addonRight.onClick?.(this.field, $event);\n }\n\n addonLeftClick($event: any) {\n this.to.addonLeft.onClick?.(this.field, $event);\n }\n}\n","<div class=\"input-group\" [class.has-validation]=\"showError\">\n <div\n class=\"input-group-text\"\n *ngIf=\"to.addonLeft\"\n [ngStyle]=\"{ cursor: to.addonLeft.onClick ? 'pointer' : 'inherit' }\"\n (click)=\"addonLeftClick($event)\"\n >\n <i [ngClass]=\"to.addonLeft.class\" *ngIf=\"to.addonLeft.class\"></i>\n <span *ngIf=\"to.addonLeft.text\">{{ to.addonLeft.text }}</span>\n </div>\n <div class=\"input-addons\">\n <ng-container #fieldComponent></ng-container>\n </div>\n <div\n class=\"input-group-text\"\n *ngIf=\"to.addonRight\"\n [ngStyle]=\"{ cursor: to.addonRight.onClick ? 'pointer' : 'inherit' }\"\n (click)=\"addonRightClick($event)\"\n >\n <i [ngClass]=\"to.addonRight.class\" *ngIf=\"to.addonRight.class\"></i>\n <span *ngIf=\"to.addonRight.text\">{{ to.addonRight.text }}</span>\n </div>\n</div>\n","import { FormlyFieldConfig } from '@ngx-formly/core';\n\nexport function addonsExtension(field: FormlyFieldConfig) {\n if (!field.templateOptions || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {\n return;\n }\n\n if (field.templateOptions.addonLeft || field.templateOptions.addonRight) {\n field.wrappers = [...(field.wrappers || []), 'addons'];\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 { FormlyWrapperAddons } from './addons.component';\nimport { addonsExtension } from './addon.extension';\n\n@NgModule({\n declarations: [FormlyWrapperAddons],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyModule.forChild({\n wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],\n extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],\n }),\n ],\n})\nexport class FormlyBootstrapAddonsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MASa,mBAAoB,SAAQ,YAAY;IACnD,eAAe,CAAC,MAAW;QACzB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;KAClD;IAED,cAAc,CAAC,MAAW;QACxB,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;KACjD;;gHAPU,mBAAmB;oGAAnB,mBAAmB,oFCThC,g2BAuBA;2FDda,mBAAmB;kBAN/B,SAAS;+BACE,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM;;;SELjC,eAAe,CAAC,KAAwB;IACtD,IAAI,CAAC,KAAK,CAAC,eAAe,KAAK,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACzF,OAAO;KACR;IAED,IAAI,KAAK,CAAC,eAAe,CAAC,SAAS,IAAI,KAAK,CAAC,eAAe,CAAC,UAAU,EAAE;QACvE,KAAK,CAAC,QAAQ,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;KACxD;AACH;;MCUa,2BAA2B;;wHAA3B,2BAA2B;yHAA3B,2BAA2B,iBAXvB,mBAAmB,aAEhC,YAAY;QACZ,mBAAmB;yHAQV,2BAA2B,YAV7B;YACP,YAAY;YACZ,mBAAmB;YAEnB,YAAY,CAAC,QAAQ,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;gBAC9D,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,CAAC;aAC/E,CAAC;SACH;2FAEU,2BAA2B;kBAZvC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,YAAY,CAAC,QAAQ,CAAC;4BACpB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4BAC9D,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,CAAC;yBAC/E,CAAC;qBACH;iBACF;;;ACnBD;;;;;;"}
|