@ngx-formly/bootstrap 6.1.8 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/checkbox/checkbox.type.mjs +5 -1
- package/esm2020/form-field/form-field.wrapper.mjs +3 -3
- package/esm2020/input/input.type.mjs +9 -1
- package/esm2020/multicheckbox/multicheckbox.type.mjs +5 -1
- package/esm2020/radio/radio.type.mjs +5 -1
- package/esm2020/select/select.type.mjs +9 -1
- package/esm2020/textarea/textarea.type.mjs +5 -1
- package/fesm2015/ngx-formly-bootstrap-checkbox.mjs +4 -0
- package/fesm2015/ngx-formly-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-form-field.mjs +2 -2
- package/fesm2015/ngx-formly-bootstrap-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-input.mjs +8 -0
- package/fesm2015/ngx-formly-bootstrap-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs +4 -0
- package/fesm2015/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-radio.mjs +4 -0
- package/fesm2015/ngx-formly-bootstrap-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-select.mjs +8 -0
- package/fesm2015/ngx-formly-bootstrap-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-bootstrap-textarea.mjs +4 -0
- package/fesm2015/ngx-formly-bootstrap-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-checkbox.mjs +4 -0
- package/fesm2020/ngx-formly-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-form-field.mjs +2 -2
- package/fesm2020/ngx-formly-bootstrap-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-input.mjs +8 -0
- package/fesm2020/ngx-formly-bootstrap-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-multicheckbox.mjs +4 -0
- package/fesm2020/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-radio.mjs +4 -0
- package/fesm2020/ngx-formly-bootstrap-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-select.mjs +8 -0
- package/fesm2020/ngx-formly-bootstrap-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-bootstrap-textarea.mjs +4 -0
- package/fesm2020/ngx-formly-bootstrap-textarea.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap-radio.mjs","sources":["../../../../src/ui/bootstrap/radio/src/radio.type.ts","../../../../src/ui/bootstrap/radio/src/radio.module.ts","../../../../src/ui/bootstrap/radio/src/ngx-formly-bootstrap-radio.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';\nimport { FormControl } from '@angular/forms';\n\ninterface RadioProps extends FormlyFieldProps {\n formCheck?: 'default' | 'inline';\n}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\n class=\"form-check\"\n [class.form-check-inline]=\"props.formCheck === 'inline'\"\n >\n <input\n type=\"radio\"\n [id]=\"id + '_' + i\"\n class=\"form-check-input\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"option.disabled ? disabledControl : formControl\"\n [formlyAttributes]=\"field\"\n />\n <label class=\"form-check-label\" [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n formCheck: 'default' as const,\n },\n };\n\n get disabledControl() {\n return new FormControl({ value: this.formControl.value, disabled: true });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-radio.mjs","sources":["../../../../src/ui/bootstrap/radio/src/radio.type.ts","../../../../src/ui/bootstrap/radio/src/radio.module.ts","../../../../src/ui/bootstrap/radio/src/ngx-formly-bootstrap-radio.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';\nimport { FormControl } from '@angular/forms';\n\ninterface RadioProps extends FormlyFieldProps {\n formCheck?: 'default' | 'inline';\n}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\n class=\"form-check\"\n [class.form-check-inline]=\"props.formCheck === 'inline'\"\n >\n <input\n type=\"radio\"\n [id]=\"id + '_' + i\"\n class=\"form-check-input\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"option.disabled ? disabledControl : formControl\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n <label class=\"form-check-label\" [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n formCheck: 'default' as const,\n },\n };\n\n get disabledControl() {\n return new FormControl({ value: this.formControl.value, disabled: true });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA2CM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AA9B5E,IAAA,WAAA,GAAA;;QA+BW,IAAA,CAAA,cAAc,GAAG;AACxB,YAA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AAA;AACE,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;wBAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;4FAEU,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAnBtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
@@ -64,6 +64,8 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
64
64
|
[compareWith]="props.compareWith"
|
|
65
65
|
[class.is-invalid]="showError"
|
|
66
66
|
[formlyAttributes]="field"
|
|
67
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
68
|
+
[attr.aria-invalid]="showError"
|
|
67
69
|
>
|
|
68
70
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
69
71
|
<ng-container *ngFor="let opt of opts">
|
|
@@ -88,6 +90,8 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
88
90
|
[compareWith]="props.compareWith"
|
|
89
91
|
[class.is-invalid]="showError"
|
|
90
92
|
[formlyAttributes]="field"
|
|
93
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
94
|
+
[attr.aria-invalid]="showError"
|
|
91
95
|
>
|
|
92
96
|
<option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
|
|
93
97
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
@@ -122,6 +126,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
122
126
|
[compareWith]="props.compareWith"
|
|
123
127
|
[class.is-invalid]="showError"
|
|
124
128
|
[formlyAttributes]="field"
|
|
129
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
130
|
+
[attr.aria-invalid]="showError"
|
|
125
131
|
>
|
|
126
132
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
127
133
|
<ng-container *ngFor="let opt of opts">
|
|
@@ -146,6 +152,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
146
152
|
[compareWith]="props.compareWith"
|
|
147
153
|
[class.is-invalid]="showError"
|
|
148
154
|
[formlyAttributes]="field"
|
|
155
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
156
|
+
[attr.aria-invalid]="showError"
|
|
149
157
|
>
|
|
150
158
|
<option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
|
|
151
159
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
@@ -1 +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, Type, ViewContainerRef } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\nimport { take } from 'rxjs/operators';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n compareWith?: (o1: any, o2: any) => boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <ng-template #fieldTypeTemplate>\n <select\n *ngIf=\"props.multiple; else singleSelect\"\n class=\"form-select\"\n multiple\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n\n <ng-template #singleSelect>\n <select\n class=\"form-select\"\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n <option *ngIf=\"props.placeholder\" [ngValue]=\"undefined\">{{ props.placeholder }}</option>\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n </ng-template>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n override defaultOptions = {\n props: {\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, hostContainerRef: ViewContainerRef) {\n super(hostContainerRef);\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":["i1"],"mappings":";;;;;;;;;;;;;
|
|
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, Type, ViewContainerRef } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\nimport { take } from 'rxjs/operators';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n compareWith?: (o1: any, o2: any) => boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <ng-template #fieldTypeTemplate>\n <select\n *ngIf=\"props.multiple; else singleSelect\"\n class=\"form-select\"\n multiple\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n\n <ng-template #singleSelect>\n <select\n class=\"form-select\"\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n <option *ngIf=\"props.placeholder\" [ngValue]=\"undefined\">{{ props.placeholder }}</option>\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n </ng-template>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n override defaultOptions = {\n props: {\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, hostContainerRef: ViewContainerRef) {\n super(hostContainerRef);\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":["i1"],"mappings":";;;;;;;;;;;;;AA8EM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;IA2C5E,WAAoB,CAAA,MAAc,EAAE,gBAAkC,EAAA;QACpE,KAAK,CAAC,gBAAgB,CAAC,CAAC;AADN,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QA1CzB,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;iBAClB;AACF,aAAA;SACF,CAAC;KAsCD;;AAnCD;;AAEG;IACH,IAA2C,cAAc,CAAC,CAAM,EAAA;QAC9D,IAAI,CAAC,CAAC,EAAE;YACN,OAAO;AACR,SAAA;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;AACpC,YAAA,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACrB,SAAA;AAED,QAAA,CAAC,CAAC,UAAU,GAAG,CAAC,KAAU,KAAI;AAC5B,YAAA,MAAM,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC;YACxB,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,IAAI,KAAK,KAAK,IA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YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;AC5BD;;AAEG;;;;"}
|
|
@@ -28,6 +28,8 @@ FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
28
28
|
class="form-control"
|
|
29
29
|
[class.is-invalid]="showError"
|
|
30
30
|
[formlyAttributes]="field"
|
|
31
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
32
|
+
[attr.aria-invalid]="showError"
|
|
31
33
|
>
|
|
32
34
|
</textarea>
|
|
33
35
|
</ng-template>
|
|
@@ -45,6 +47,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
45
47
|
class="form-control"
|
|
46
48
|
[class.is-invalid]="showError"
|
|
47
49
|
[formlyAttributes]="field"
|
|
50
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
51
|
+
[attr.aria-invalid]="showError"
|
|
48
52
|
>
|
|
49
53
|
</textarea>
|
|
50
54
|
</ng-template>
|
|
@@ -1 +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, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface TextAreaProps extends FormlyFieldProps {\n cols?: number;\n rows?: number;\n}\n\nexport interface FormlyTextAreaFieldConfig extends FormlyFieldConfig<TextAreaProps> {\n type: 'textarea' | Type<FormlyFieldTextArea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-template #fieldTypeTemplate>\n <textarea\n [formControl]=\"formControl\"\n [cols]=\"props.cols\"\n [rows]=\"props.rows\"\n class=\"form-control\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n </textarea>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldTextArea extends FieldType<FieldTypeConfig<TextAreaProps>> {\n override defaultOptions = {\n props: {\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":["i1"],"mappings":";;;;;;;;;
|
|
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, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface TextAreaProps extends FormlyFieldProps {\n cols?: number;\n rows?: number;\n}\n\nexport interface FormlyTextAreaFieldConfig extends FormlyFieldConfig<TextAreaProps> {\n type: 'textarea' | Type<FormlyFieldTextArea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-template #fieldTypeTemplate>\n <textarea\n [formControl]=\"formControl\"\n [cols]=\"props.cols\"\n [rows]=\"props.rows\"\n class=\"form-control\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n </textarea>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldTextArea extends FieldType<FieldTypeConfig<TextAreaProps>> {\n override defaultOptions = {\n props: {\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":["i1"],"mappings":";;;;;;;;;AAgCM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AAnBlF,IAAA,WAAA,GAAA;;QAoBW,IAAA,CAAA,cAA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,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -38,6 +38,8 @@ FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
38
38
|
[indeterminate]="props.indeterminate && formControl.value == null"
|
|
39
39
|
[formControl]="formControl"
|
|
40
40
|
[formlyAttributes]="field"
|
|
41
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
42
|
+
[attr.aria-invalid]="showError"
|
|
41
43
|
/>
|
|
42
44
|
<label *ngIf="props.formCheck !== 'nolabel'" [for]="id" class="form-check-label">
|
|
43
45
|
{{ props.label }}
|
|
@@ -67,6 +69,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
67
69
|
[indeterminate]="props.indeterminate && formControl.value == null"
|
|
68
70
|
[formControl]="formControl"
|
|
69
71
|
[formlyAttributes]="field"
|
|
72
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
73
|
+
[attr.aria-invalid]="showError"
|
|
70
74
|
/>
|
|
71
75
|
<label *ngIf="props.formCheck !== 'nolabel'" [for]="id" class="form-check-label">
|
|
72
76
|
{{ props.label }}
|
|
@@ -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, 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":";;;;;;;;;;
|
|
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 [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\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":";;;;;;;;;;AA4CM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AA/BlF,IAAA,WAAA,GAAA;;AAgCW,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,EA7BpB,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA,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AAA,CAAA;;;AC7BD;;AAEG;;;;"}
|
|
@@ -29,7 +29,7 @@ FormlyWrapperFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
29
29
|
</ng-container>
|
|
30
30
|
|
|
31
31
|
<div *ngIf="showError" class="invalid-feedback" [style.display]="'block'">
|
|
32
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
32
|
+
<formly-validation-message id="{{ id }}-formly-validation-error" [field]="field"></formly-validation-message>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
<small *ngIf="props.description" class="form-text text-muted">{{ props.description }}</small>
|
|
@@ -59,7 +59,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
59
59
|
</ng-container>
|
|
60
60
|
|
|
61
61
|
<div *ngIf="showError" class="invalid-feedback" [style.display]="'block'">
|
|
62
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
62
|
+
<formly-validation-message id="{{ id }}-formly-validation-error" [field]="field"></formly-validation-message>
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
65
|
<small *ngIf="props.description" class="form-text text-muted">{{ props.description }}</small>
|
|
@@ -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/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,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBT,EAAA,CAAA;AACF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AAhB,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;;;;"}
|
|
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 id=\"{{ id }}-formly-validation-error\" [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,o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WAAgB,CAAA;AAOvG,IAAA,WAAA,CAAgC,gBAAmC,EAAA;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;;;;"}
|
|
@@ -23,6 +23,8 @@ FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
23
23
|
class="form-control"
|
|
24
24
|
[formlyAttributes]="field"
|
|
25
25
|
[class.is-invalid]="showError"
|
|
26
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
27
|
+
[attr.aria-invalid]="showError"
|
|
26
28
|
/>
|
|
27
29
|
<ng-template #numberTmp>
|
|
28
30
|
<input
|
|
@@ -31,6 +33,8 @@ FormlyFieldInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
31
33
|
class="form-control"
|
|
32
34
|
[formlyAttributes]="field"
|
|
33
35
|
[class.is-invalid]="showError"
|
|
36
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
37
|
+
[attr.aria-invalid]="showError"
|
|
34
38
|
/>
|
|
35
39
|
</ng-template>
|
|
36
40
|
</ng-template>
|
|
@@ -48,6 +52,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
48
52
|
class="form-control"
|
|
49
53
|
[formlyAttributes]="field"
|
|
50
54
|
[class.is-invalid]="showError"
|
|
55
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
56
|
+
[attr.aria-invalid]="showError"
|
|
51
57
|
/>
|
|
52
58
|
<ng-template #numberTmp>
|
|
53
59
|
<input
|
|
@@ -56,6 +62,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
56
62
|
class="form-control"
|
|
57
63
|
[formlyAttributes]="field"
|
|
58
64
|
[class.is-invalid]="showError"
|
|
65
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
66
|
+
[attr.aria-invalid]="showError"
|
|
59
67
|
/>
|
|
60
68
|
</ng-template>
|
|
61
69
|
</ng-template>
|
|
@@ -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, 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":";;;;;;;;;;
|
|
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 [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-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 [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-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":";;;;;;;;;;AAuCM,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,EA3BjB,QAAA,EAAA,oBAAA,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,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,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,SAAA,CAAA,EAA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AAA;AACE,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,OAAO,EAAE,OAAO;AAChB,oCAAA,cAAc,EAAE;AACd,wCAAA,KAAK,EAAE;AACL,4CAAA,IAAI,EAAE,QAAQ;AACf,yCAAA;AACF,qCAAA;AACF,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC7CD;;AAEG;;;;"}
|
|
@@ -45,6 +45,8 @@ FormlyFieldMultiCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
45
45
|
'form-check-inline': props.formCheck === 'inline' || props.formCheck === 'inline-switch',
|
|
46
46
|
'form-switch': props.formCheck === 'switch' || props.formCheck === 'inline-switch'
|
|
47
47
|
}"
|
|
48
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
49
|
+
[attr.aria-invalid]="showError"
|
|
48
50
|
>
|
|
49
51
|
<input
|
|
50
52
|
type="checkbox"
|
|
@@ -75,6 +77,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
75
77
|
'form-check-inline': props.formCheck === 'inline' || props.formCheck === 'inline-switch',
|
|
76
78
|
'form-switch': props.formCheck === 'switch' || props.formCheck === 'inline-switch'
|
|
77
79
|
}"
|
|
80
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
81
|
+
[attr.aria-invalid]="showError"
|
|
78
82
|
>
|
|
79
83
|
<input
|
|
80
84
|
type="checkbox"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap-multicheckbox.mjs","sources":["../../../../src/ui/bootstrap/multicheckbox/src/multicheckbox.type.ts","../../../../src/ui/bootstrap/multicheckbox/src/multicheckbox.module.ts","../../../../src/ui/bootstrap/multicheckbox/src/ngx-formly-bootstrap-multicheckbox.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 MultiCheckboxProps extends FormlyFieldProps {\n formCheck: 'default' | 'inline' | 'switch' | 'inline-switch';\n}\n\nexport interface FormlyMultiCheckboxFieldConfig extends FormlyFieldConfig<MultiCheckboxProps> {\n type: 'multicheckbox' | Type<FormlyFieldMultiCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\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 [id]=\"id + '_' + i\"\n class=\"form-check-input\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n [disabled]=\"formControl.disabled || option.disabled\"\n (change)=\"onChange(option.value, $any($event.target).checked)\"\n />\n <label class=\"form-check-label\" [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType<FieldTypeConfig<MultiCheckboxProps>> {\n override defaultOptions = {\n props: {\n formCheck: 'default' as const, // 'default' | 'inline' | 'switch' | 'inline-switch'\n },\n };\n\n onChange(value: any, checked: boolean) {\n this.formControl.markAsDirty();\n if (this.props.type === 'array') {\n this.formControl.patchValue(\n checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter((o) => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);\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';\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\n\nimport { FormlyFieldMultiCheckbox } from './multicheckbox.type';\n\n@NgModule({\n declarations: [FormlyFieldMultiCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapMultiCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-multicheckbox.mjs","sources":["../../../../src/ui/bootstrap/multicheckbox/src/multicheckbox.type.ts","../../../../src/ui/bootstrap/multicheckbox/src/multicheckbox.module.ts","../../../../src/ui/bootstrap/multicheckbox/src/ngx-formly-bootstrap-multicheckbox.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 MultiCheckboxProps extends FormlyFieldProps {\n formCheck: 'default' | 'inline' | 'switch' | 'inline-switch';\n}\n\nexport interface FormlyMultiCheckboxFieldConfig extends FormlyFieldConfig<MultiCheckboxProps> {\n type: 'multicheckbox' | Type<FormlyFieldMultiCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-multicheckbox',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\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 [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n <input\n type=\"checkbox\"\n [id]=\"id + '_' + i\"\n class=\"form-check-input\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n [disabled]=\"formControl.disabled || option.disabled\"\n (change)=\"onChange(option.value, $any($event.target).checked)\"\n />\n <label class=\"form-check-label\" [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType<FieldTypeConfig<MultiCheckboxProps>> {\n override defaultOptions = {\n props: {\n formCheck: 'default' as const, // 'default' | 'inline' | 'switch' | 'inline-switch'\n },\n };\n\n onChange(value: any, checked: boolean) {\n this.formControl.markAsDirty();\n if (this.props.type === 'array') {\n this.formControl.patchValue(\n checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter((o) => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);\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';\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\n\nimport { FormlyFieldMultiCheckbox } from './multicheckbox.type';\n\n@NgModule({\n declarations: [FormlyFieldMultiCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapMultiCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AA4CM,MAAO,wBAAyB,SAAQ,SAA8C,CAAA;AAhC5F,IAAA,WAAA,GAAA;;AAiCW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,SAAS,EAAE,SAAkB;AAC9B,aAAA;SACF,CAAC;AAqBH,KAAA;IAnBC,QAAQ,CAAC,KAAU,EAAE,OAAgB,EAAA;AACnC,QAAA,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;AAC/B,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;AAC/B,YAAA,IAAI,CAAC,WAAW,CAAC,UAAU,CACzB,OAAO;AACL,kBAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC;kBAC1C,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CACnE,CAAC;AACH,SAAA;AAAM,aAAA;YACL,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC;AAC9E,SAAA;AACD,QAAA,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;KAClC;AAED,IAAA,SAAS,CAAC,MAAW,EAAA;AACnB,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAErC,QAAA,OAAO,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO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,IAAI,EAAE,eAAe;AACrB,oCAAA,SAAS,EAAE,wBAAwB;oCACnC,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
@@ -41,6 +41,8 @@ FormlyFieldRadio.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
41
41
|
[value]="option.value"
|
|
42
42
|
[formControl]="option.disabled ? disabledControl : formControl"
|
|
43
43
|
[formlyAttributes]="field"
|
|
44
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
45
|
+
[attr.aria-invalid]="showError"
|
|
44
46
|
/>
|
|
45
47
|
<label class="form-check-label" [for]="id + '_' + i">
|
|
46
48
|
{{ option.label }}
|
|
@@ -69,6 +71,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
69
71
|
[value]="option.value"
|
|
70
72
|
[formControl]="option.disabled ? disabledControl : formControl"
|
|
71
73
|
[formlyAttributes]="field"
|
|
74
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
75
|
+
[attr.aria-invalid]="showError"
|
|
72
76
|
/>
|
|
73
77
|
<label class="form-check-label" [for]="id + '_' + i">
|
|
74
78
|
{{ option.label }}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap-radio.mjs","sources":["../../../../src/ui/bootstrap/radio/src/radio.type.ts","../../../../src/ui/bootstrap/radio/src/radio.module.ts","../../../../src/ui/bootstrap/radio/src/ngx-formly-bootstrap-radio.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';\nimport { FormControl } from '@angular/forms';\n\ninterface RadioProps extends FormlyFieldProps {\n formCheck?: 'default' | 'inline';\n}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\n class=\"form-check\"\n [class.form-check-inline]=\"props.formCheck === 'inline'\"\n >\n <input\n type=\"radio\"\n [id]=\"id + '_' + i\"\n class=\"form-check-input\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"option.disabled ? disabledControl : formControl\"\n [formlyAttributes]=\"field\"\n />\n <label class=\"form-check-label\" [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n formCheck: 'default' as const,\n },\n };\n\n get disabledControl() {\n return new FormControl({ value: this.formControl.value, disabled: true });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-radio.mjs","sources":["../../../../src/ui/bootstrap/radio/src/radio.type.ts","../../../../src/ui/bootstrap/radio/src/radio.module.ts","../../../../src/ui/bootstrap/radio/src/ngx-formly-bootstrap-radio.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';\nimport { FormControl } from '@angular/forms';\n\ninterface RadioProps extends FormlyFieldProps {\n formCheck?: 'default' | 'inline';\n}\n\nexport interface FormlyRadioFieldConfig extends FormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <ng-template #fieldTypeTemplate>\n <div\n *ngFor=\"let option of props.options | formlySelectOptions : field | async; let i = index\"\n class=\"form-check\"\n [class.form-check-inline]=\"props.formCheck === 'inline'\"\n >\n <input\n type=\"radio\"\n [id]=\"id + '_' + i\"\n class=\"form-check-input\"\n [name]=\"field.name || id\"\n [class.is-invalid]=\"showError\"\n [attr.value]=\"option.value\"\n [value]=\"option.value\"\n [formControl]=\"option.disabled ? disabledControl : formControl\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n <label class=\"form-check-label\" [for]=\"id + '_' + i\">\n {{ option.label }}\n </label>\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n formCheck: 'default' as const,\n },\n };\n\n get disabledControl() {\n return new FormControl({ value: this.formControl.value, disabled: true });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyBootstrapRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AA2CM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AA9B5E,IAAA,WAAA,GAAA;;AA+BW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,SAAS,EAAE,SAAkB;AAC9B,aAAA;SACF,CAAC;AAKH,KAAA;AAHC,IAAA,IAAI,eAAe,GAAA;AACjB,QAAA,OAAO,IAAI,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;KAC3E;;8GATU,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,EA5BjB,QAAA,EAAA,oBAAA,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,OAAA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DeclareComponent({ minVersion: "12.0.0", vers
|
|
|
64
64
|
[compareWith]="props.compareWith"
|
|
65
65
|
[class.is-invalid]="showError"
|
|
66
66
|
[formlyAttributes]="field"
|
|
67
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
68
|
+
[attr.aria-invalid]="showError"
|
|
67
69
|
>
|
|
68
70
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
69
71
|
<ng-container *ngFor="let opt of opts">
|
|
@@ -88,6 +90,8 @@ FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
88
90
|
[compareWith]="props.compareWith"
|
|
89
91
|
[class.is-invalid]="showError"
|
|
90
92
|
[formlyAttributes]="field"
|
|
93
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
94
|
+
[attr.aria-invalid]="showError"
|
|
91
95
|
>
|
|
92
96
|
<option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
|
|
93
97
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
@@ -122,6 +126,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
122
126
|
[compareWith]="props.compareWith"
|
|
123
127
|
[class.is-invalid]="showError"
|
|
124
128
|
[formlyAttributes]="field"
|
|
129
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
130
|
+
[attr.aria-invalid]="showError"
|
|
125
131
|
>
|
|
126
132
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
127
133
|
<ng-container *ngFor="let opt of opts">
|
|
@@ -146,6 +152,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
146
152
|
[compareWith]="props.compareWith"
|
|
147
153
|
[class.is-invalid]="showError"
|
|
148
154
|
[formlyAttributes]="field"
|
|
155
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
156
|
+
[attr.aria-invalid]="showError"
|
|
149
157
|
>
|
|
150
158
|
<option *ngIf="props.placeholder" [ngValue]="undefined">{{ props.placeholder }}</option>
|
|
151
159
|
<ng-container *ngIf="props.options | formlySelectOptions : field | async as opts">
|
|
@@ -1 +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, Type, ViewContainerRef } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\nimport { take } from 'rxjs/operators';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n compareWith?: (o1: any, o2: any) => boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <ng-template #fieldTypeTemplate>\n <select\n *ngIf=\"props.multiple; else singleSelect\"\n class=\"form-select\"\n multiple\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n\n <ng-template #singleSelect>\n <select\n class=\"form-select\"\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n <option *ngIf=\"props.placeholder\" [ngValue]=\"undefined\">{{ props.placeholder }}</option>\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n </ng-template>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n override defaultOptions = {\n props: {\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, hostContainerRef: ViewContainerRef) {\n super(hostContainerRef);\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":["i1"],"mappings":";;;;;;;;;;;;;
|
|
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, Type, ViewContainerRef } from '@angular/core';\nimport { SelectControlValueAccessor } from '@angular/forms';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\nimport { take } from 'rxjs/operators';\nimport { FormlyFieldSelectProps } from '@ngx-formly/core/select';\n\ninterface SelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n multiple?: boolean;\n compareWith?: (o1: any, o2: any) => boolean;\n}\n\nexport interface FormlySelectFieldConfig extends FormlyFieldConfig<SelectProps> {\n type: 'select' | Type<FormlyFieldSelect>;\n}\n\n@Component({\n selector: 'formly-field-select',\n template: `\n <ng-template #fieldTypeTemplate>\n <select\n *ngIf=\"props.multiple; else singleSelect\"\n class=\"form-select\"\n multiple\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n\n <ng-template #singleSelect>\n <select\n class=\"form-select\"\n [formControl]=\"formControl\"\n [compareWith]=\"props.compareWith\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n <option *ngIf=\"props.placeholder\" [ngValue]=\"undefined\">{{ props.placeholder }}</option>\n <ng-container *ngIf=\"props.options | formlySelectOptions : field | async as opts\">\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-container>\n </select>\n </ng-template>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType<FieldTypeConfig<SelectProps>> {\n override defaultOptions = {\n props: {\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, hostContainerRef: ViewContainerRef) {\n super(hostContainerRef);\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":["i1"],"mappings":";;;;;;;;;;;;;AA8EM,MAAO,iBAAkB,SAAQ,SAAuC,CAAA;IA2C5E,WAAoB,CAAA,MAAc,EAAE,gBAAkC,EAAA;QACpE,KAAK,CAAC,gBAAgB,CAAC,CAAC;QADN,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AA1CzB,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;gBACL,WAAW,CAAC,EAAO,EAAE,EAAO,EAAA;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC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B,EAlB7B,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,mBAAmB;YAEnB,8BAA8B;YAC9B,kBAAkB;YAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACD,oBAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,iBAAA;aACF,CAAC;AACH,SAAA,CAAA,EAAA,CAAA,CAAA;4FAEU,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBApBvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,QAAQ;AACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACpC,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
|
|
@@ -28,6 +28,8 @@ FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
28
28
|
class="form-control"
|
|
29
29
|
[class.is-invalid]="showError"
|
|
30
30
|
[formlyAttributes]="field"
|
|
31
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
32
|
+
[attr.aria-invalid]="showError"
|
|
31
33
|
>
|
|
32
34
|
</textarea>
|
|
33
35
|
</ng-template>
|
|
@@ -45,6 +47,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
45
47
|
class="form-control"
|
|
46
48
|
[class.is-invalid]="showError"
|
|
47
49
|
[formlyAttributes]="field"
|
|
50
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
51
|
+
[attr.aria-invalid]="showError"
|
|
48
52
|
>
|
|
49
53
|
</textarea>
|
|
50
54
|
</ng-template>
|
|
@@ -1 +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, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface TextAreaProps extends FormlyFieldProps {\n cols?: number;\n rows?: number;\n}\n\nexport interface FormlyTextAreaFieldConfig extends FormlyFieldConfig<TextAreaProps> {\n type: 'textarea' | Type<FormlyFieldTextArea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-template #fieldTypeTemplate>\n <textarea\n [formControl]=\"formControl\"\n [cols]=\"props.cols\"\n [rows]=\"props.rows\"\n class=\"form-control\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n >\n </textarea>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldTextArea extends FieldType<FieldTypeConfig<TextAreaProps>> {\n override defaultOptions = {\n props: {\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":["i1"],"mappings":";;;;;;;;;
|
|
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, Type } from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface TextAreaProps extends FormlyFieldProps {\n cols?: number;\n rows?: number;\n}\n\nexport interface FormlyTextAreaFieldConfig extends FormlyFieldConfig<TextAreaProps> {\n type: 'textarea' | Type<FormlyFieldTextArea>;\n}\n\n@Component({\n selector: 'formly-field-textarea',\n template: `\n <ng-template #fieldTypeTemplate>\n <textarea\n [formControl]=\"formControl\"\n [cols]=\"props.cols\"\n [rows]=\"props.rows\"\n class=\"form-control\"\n [class.is-invalid]=\"showError\"\n [formlyAttributes]=\"field\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n >\n </textarea>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldTextArea extends FieldType<FieldTypeConfig<TextAreaProps>> {\n override defaultOptions = {\n props: {\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":["i1"],"mappings":";;;;;;;;;AAgCM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AAnBlF,IAAA,WAAA,GAAA;;AAoBW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,CAAC;AACP,gBAAA,IAAI,EAAE,CAAC;AACR,aAAA;SACF,CAAC;AACH,KAAA;;iHAPY,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,EAjBpB,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;AAcT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA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