@ngx-formly/bootstrap 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/fesm2022/ngx-formly-bootstrap-addons.mjs +8 -8
- package/fesm2022/ngx-formly-bootstrap-addons.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-checkbox.mjs +25 -16
- package/fesm2022/ngx-formly-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-form-field.mjs +64 -48
- package/fesm2022/ngx-formly-bootstrap-form-field.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-input.mjs +37 -37
- package/fesm2022/ngx-formly-bootstrap-input.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-multicheckbox.mjs +61 -58
- package/fesm2022/ngx-formly-bootstrap-multicheckbox.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-radio.mjs +54 -57
- package/fesm2022/ngx-formly-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-select.mjs +8 -7
- package/fesm2022/ngx-formly-bootstrap-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap-textarea.mjs +8 -7
- package/fesm2022/ngx-formly-bootstrap-textarea.mjs.map +1 -1
- package/fesm2022/ngx-formly-bootstrap.mjs +4 -4
- package/form-field/field.type.d.ts +1 -1
- package/package.json +2 -20
- package/esm2022/addons/addon.extension.mjs +0 -9
- package/esm2022/addons/addons.component.mjs +0 -31
- package/esm2022/addons/addons.config.mjs +0 -9
- package/esm2022/addons/addons.module.mjs +0 -21
- package/esm2022/addons/ngx-formly-bootstrap-addons.mjs +0 -5
- package/esm2022/addons/public_api.mjs +0 -3
- package/esm2022/checkbox/checkbox.config.mjs +0 -17
- package/esm2022/checkbox/checkbox.module.mjs +0 -32
- package/esm2022/checkbox/checkbox.type.mjs +0 -81
- package/esm2022/checkbox/ngx-formly-bootstrap-checkbox.mjs +0 -5
- package/esm2022/checkbox/public_api.mjs +0 -4
- package/esm2022/form-field/field.type.mjs +0 -25
- package/esm2022/form-field/form-field.config.mjs +0 -12
- package/esm2022/form-field/form-field.module.mjs +0 -21
- package/esm2022/form-field/form-field.wrapper.mjs +0 -72
- package/esm2022/form-field/ngx-formly-bootstrap-form-field.mjs +0 -5
- package/esm2022/form-field/public_api.mjs +0 -4
- package/esm2022/input/input.config.mjs +0 -32
- package/esm2022/input/input.module.mjs +0 -32
- package/esm2022/input/input.type.mjs +0 -70
- package/esm2022/input/ngx-formly-bootstrap-input.mjs +0 -5
- package/esm2022/input/public_api.mjs +0 -4
- package/esm2022/lib/bootstrap.config.mjs +0 -21
- package/esm2022/lib/bootstrap.mjs +0 -3
- package/esm2022/lib/bootstrap.module.mjs +0 -45
- package/esm2022/multicheckbox/multicheckbox.config.mjs +0 -13
- package/esm2022/multicheckbox/multicheckbox.module.mjs +0 -36
- package/esm2022/multicheckbox/multicheckbox.type.mjs +0 -99
- package/esm2022/multicheckbox/ngx-formly-bootstrap-multicheckbox.mjs +0 -5
- package/esm2022/multicheckbox/public_api.mjs +0 -4
- package/esm2022/ngx-formly-bootstrap.mjs +0 -5
- package/esm2022/public_api.mjs +0 -5
- package/esm2022/radio/ngx-formly-bootstrap-radio.mjs +0 -5
- package/esm2022/radio/public_api.mjs +0 -4
- package/esm2022/radio/radio.config.mjs +0 -13
- package/esm2022/radio/radio.module.mjs +0 -36
- package/esm2022/radio/radio.type.mjs +0 -82
- package/esm2022/select/ngx-formly-bootstrap-select.mjs +0 -5
- package/esm2022/select/public_api.mjs +0 -4
- package/esm2022/select/select.config.mjs +0 -14
- package/esm2022/select/select.module.mjs +0 -36
- package/esm2022/select/select.type.mjs +0 -144
- package/esm2022/textarea/ngx-formly-bootstrap-textarea.mjs +0 -5
- package/esm2022/textarea/public_api.mjs +0 -4
- package/esm2022/textarea/textarea.config.mjs +0 -13
- package/esm2022/textarea/textarea.module.mjs +0 -32
- package/esm2022/textarea/textarea.type.mjs +0 -53
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ Formly is a dynamic (JSON powered) form library for Angular that brings unmatche
|
|
|
57
57
|
|
|
58
58
|
| Angular version | Formly version |
|
|
59
59
|
| --------------- | ---------------------- |
|
|
60
|
+
| Angular >= 19 | `@ngx-formly/core@8.x` |
|
|
60
61
|
| Angular >= 18 | `@ngx-formly/core@7.x` |
|
|
61
62
|
| Angular >= 13 | `@ngx-formly/core@6.x` |
|
|
62
63
|
| Angular >= 7 | `@ngx-formly/core@5.x` |
|
|
@@ -65,6 +66,15 @@ Formly is a dynamic (JSON powered) form library for Angular that brings unmatche
|
|
|
65
66
|
| Angular >= 4 | `@ngx-formly/core@2.x` |
|
|
66
67
|
| Angular >= 2 | `ng-formly@1.x` |
|
|
67
68
|
|
|
69
|
+
#### Upgrading to v8
|
|
70
|
+
|
|
71
|
+
Formly v8 requires Angular 19 or newer. Upgrade Angular first, then update all
|
|
72
|
+
`@ngx-formly/*` packages used by your application together to v8.
|
|
73
|
+
The Material, PrimeNG, and NG-ZORRO integrations require version 19 or newer of
|
|
74
|
+
their respective UI libraries. Applications staying on Angular 18 should use Formly v7.
|
|
75
|
+
|
|
76
|
+
See the [changelog](CHANGELOG.md) for the full list of changes.
|
|
77
|
+
|
|
68
78
|
## Core Team
|
|
69
79
|
|
|
70
80
|
<table>
|
|
@@ -22,12 +22,12 @@ class FormlyWrapperAddons extends FieldWrapper {
|
|
|
22
22
|
addonLeftClick($event) {
|
|
23
23
|
this.props.addonLeft.onClick?.(this.field, $event);
|
|
24
24
|
}
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyWrapperAddons, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: FormlyWrapperAddons, isStandalone: false, selector: "formly-wrapper-addons", viewQueries: [{ propertyName: "content", first: true, predicate: ["fieldTypeTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyWrapperAddons, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
|
-
args: [{ selector: 'formly-wrapper-addons', encapsulation: ViewEncapsulation.None, template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n
|
|
30
|
+
args: [{ selector: 'formly-wrapper-addons', encapsulation: ViewEncapsulation.None, standalone: false, template: "<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n", styles: ["formly-wrapper-form-field .input-group-btn{cursor:pointer}\n"] }]
|
|
31
31
|
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { content: [{
|
|
32
32
|
type: ViewChild,
|
|
33
33
|
args: ['fieldTypeTemplate', { static: true }]
|
|
@@ -50,11 +50,11 @@ function withFormlyWrapperAddons() {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
class FormlyBootstrapAddonsModule {
|
|
53
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
54
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
55
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
54
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, declarations: [FormlyWrapperAddons], imports: [CommonModule, ReactiveFormsModule, i1$1.FormlyModule] }); }
|
|
55
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyWrapperAddons())] }); }
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapAddonsModule, decorators: [{
|
|
58
58
|
type: NgModule,
|
|
59
59
|
args: [{
|
|
60
60
|
declarations: [FormlyWrapperAddons],
|
|
@@ -1 +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.config.ts","../../../../src/ui/bootstrap/addons/src/addons.module.ts","../../../../src/ui/bootstrap/addons/src/ngx-formly-bootstrap-addons.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { FormlyFieldConfig, FieldTypeConfig, FieldWrapper } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface AddonsProps extends FormlyFieldProps {\n addonRight?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n addonLeft?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n}\n\n@Component({\n selector: 'formly-wrapper-addons',\n templateUrl: './addons.component.html',\n styleUrls: ['./addons.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormlyWrapperAddons extends FieldWrapper<FieldTypeConfig<AddonsProps>> {\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(private hostContainerRef?: ViewContainerRef) {\n super();\n }\n\n addonRightClick($event: any) {\n this.props.addonRight.onClick?.(this.field, $event);\n }\n\n addonLeftClick($event: any) {\n this.props.addonLeft.onClick?.(this.field, $event);\n }\n}\n","<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n
|
|
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.config.ts","../../../../src/ui/bootstrap/addons/src/addons.module.ts","../../../../src/ui/bootstrap/addons/src/ngx-formly-bootstrap-addons.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { FormlyFieldConfig, FieldTypeConfig, FieldWrapper } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/bootstrap/form-field';\n\ninterface AddonsProps extends FormlyFieldProps {\n addonRight?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n addonLeft?: {\n onClick?: (field: FormlyFieldConfig, event?: any) => void;\n class?: string;\n text?: string;\n };\n}\n\n@Component({\n selector: 'formly-wrapper-addons',\n templateUrl: './addons.component.html',\n styleUrls: ['./addons.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class FormlyWrapperAddons extends FieldWrapper<FieldTypeConfig<AddonsProps>> {\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(private hostContainerRef?: ViewContainerRef) {\n super();\n }\n\n addonRightClick($event: any) {\n this.props.addonRight.onClick?.(this.field, $event);\n }\n\n addonLeftClick($event: any) {\n this.props.addonLeft.onClick?.(this.field, $event);\n }\n}\n","<ng-template #fieldTypeTemplate>\n <div class=\"input-group\" [class.has-validation]=\"showError\">\n @if (props.addonLeft) {\n <div class=\"input-group-text\" [class.input-group-btn]=\"props.addonLeft.onClick\" (click)=\"addonLeftClick($event)\">\n @if (props.addonLeft.class) {\n <i [ngClass]=\"props.addonLeft.class\"></i>\n }\n @if (props.addonLeft.text) {\n <span>{{ props.addonLeft.text }}</span>\n }\n </div>\n }\n <ng-container #fieldComponent></ng-container>\n @if (props.addonRight) {\n <div\n class=\"input-group-text\"\n [class.input-group-btn]=\"props.addonRight.onClick\"\n (click)=\"addonRightClick($event)\"\n >\n @if (props.addonRight.class) {\n <i [ngClass]=\"props.addonRight.class\"></i>\n }\n @if (props.addonRight.text) {\n <span>{{ props.addonRight.text }}</span>\n }\n </div>\n }\n </div>\n</ng-template>\n","import { FormlyFieldConfig } from '@ngx-formly/core';\n\nexport function addonsExtension(field: FormlyFieldConfig) {\n if (!field.props || (field.wrappers && field.wrappers.indexOf('addons') !== -1)) {\n return;\n }\n\n if (field.props.addonLeft || field.props.addonRight) {\n field.wrappers = [...(field.wrappers || []), 'addons'];\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperAddons } from './addons.component';\nimport { addonsExtension } from './addon.extension';\n\nexport function withFormlyWrapperAddons(): ConfigOption {\n return {\n wrappers: [{ name: 'addons', component: FormlyWrapperAddons }],\n extensions: [{ name: 'addons', extension: { postPopulate: addonsExtension } }],\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 { FormlyWrapperAddons } from './addons.component';\nimport { withFormlyWrapperAddons } from './addons.config';\n\n@NgModule({\n declarations: [FormlyWrapperAddons],\n imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyWrapperAddons())],\n})\nexport class FormlyBootstrapAddonsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;AAwBM,MAAO,mBAAoB,SAAQ,YAA0C,CAAA;IACjF,IAAsD,OAAO,CAAC,WAA6B,EAAA;AACzF,QAAA,IAAI,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACxC,YAAA,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,WAAW,CAAC;QACvD;IACF;AAEA,IAAA,WAAA,CAAoB,gBAAmC,EAAA;AACrD,QAAA,KAAK,EAAE;QADW,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;IAEpC;AAEA,IAAA,eAAe,CAAC,MAAW,EAAA;AACzB,QAAA,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC;IACrD;AAEA,IAAA,cAAc,CAAC,MAAW,EAAA;AACxB,QAAA,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC;IACpD;+GAjBW,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,qOCxBhC,29BA6BA,EAAA,MAAA,EAAA,CAAA,8DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,E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,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,EAAA,YAAA,EAAA,CAHvB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACxB,YAAY,EAAE,mBAAmB,EAAAA,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA;gHAEhC,2BAA2B,EAAA,OAAA,EAAA,CAF5B,YAAY,EAAE,mBAAmB,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAElF,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAJvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAAC;AAC/F,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -19,8 +19,8 @@ class FormlyFieldCheckbox extends FieldType {
|
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: FormlyFieldCheckbox, isStandalone: false, selector: "formly-field-checkbox", usesInheritance: true, ngImport: i0, template: `
|
|
24
24
|
<ng-template #fieldTypeTemplate>
|
|
25
25
|
<div
|
|
26
26
|
class="form-check"
|
|
@@ -40,15 +40,19 @@ class FormlyFieldCheckbox extends FieldType {
|
|
|
40
40
|
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
41
41
|
[attr.aria-invalid]="showError"
|
|
42
42
|
/>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
@if (props.formCheck !== 'nolabel') {
|
|
44
|
+
<label [for]="id" class="form-check-label">
|
|
45
|
+
{{ props.label }}
|
|
46
|
+
@if (props.required && props.hideRequiredMarker !== true) {
|
|
47
|
+
<span aria-hidden="true">*</span>
|
|
48
|
+
}
|
|
49
|
+
</label>
|
|
50
|
+
}
|
|
47
51
|
</div>
|
|
48
52
|
</ng-template>
|
|
49
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type:
|
|
53
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
50
54
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
|
|
52
56
|
type: Component,
|
|
53
57
|
args: [{
|
|
54
58
|
selector: 'formly-field-checkbox',
|
|
@@ -72,14 +76,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
72
76
|
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
73
77
|
[attr.aria-invalid]="showError"
|
|
74
78
|
/>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
@if (props.formCheck !== 'nolabel') {
|
|
80
|
+
<label [for]="id" class="form-check-label">
|
|
81
|
+
{{ props.label }}
|
|
82
|
+
@if (props.required && props.hideRequiredMarker !== true) {
|
|
83
|
+
<span aria-hidden="true">*</span>
|
|
84
|
+
}
|
|
85
|
+
</label>
|
|
86
|
+
}
|
|
79
87
|
</div>
|
|
80
88
|
</ng-template>
|
|
81
89
|
`,
|
|
82
90
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
91
|
+
standalone: false,
|
|
83
92
|
}]
|
|
84
93
|
}] });
|
|
85
94
|
|
|
@@ -100,16 +109,16 @@ function withFormlyFieldCheckbox() {
|
|
|
100
109
|
}
|
|
101
110
|
|
|
102
111
|
class FormlyBootstrapCheckboxModule {
|
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
104
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
113
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
|
|
105
114
|
ReactiveFormsModule,
|
|
106
115
|
FormlyBootstrapFormFieldModule, i3.FormlyModule] }); }
|
|
107
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
116
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapCheckboxModule, imports: [CommonModule,
|
|
108
117
|
ReactiveFormsModule,
|
|
109
118
|
FormlyBootstrapFormFieldModule,
|
|
110
119
|
FormlyModule.forChild(withFormlyFieldCheckbox())] }); }
|
|
111
120
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapCheckboxModule, decorators: [{
|
|
113
122
|
type: NgModule,
|
|
114
123
|
args: [{
|
|
115
124
|
declarations: [FormlyFieldCheckbox],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap-checkbox.mjs","sources":["../../../../src/ui/bootstrap/checkbox/src/checkbox.type.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.config.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
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-checkbox.mjs","sources":["../../../../src/ui/bootstrap/checkbox/src/checkbox.type.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.config.ts","../../../../src/ui/bootstrap/checkbox/src/checkbox.module.ts","../../../../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 @if (props.formCheck !== 'nolabel') {\n <label [for]=\"id\" class=\"form-check-label\">\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </div>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldCheckbox extends FieldType<FieldTypeConfig<CheckboxProps>> {\n override defaultOptions = {\n props: {\n indeterminate: true,\n hideLabel: true,\n formCheck: 'default' as const,\n },\n };\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\nexport function withFormlyFieldCheckbox(): ConfigOption {\n return {\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\n\nimport { FormlyFieldCheckbox } from './checkbox.type';\nimport { withFormlyFieldCheckbox } from './checkbox.config';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckbox()),\n ],\n})\nexport class FormlyBootstrapCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAiDM,MAAO,mBAAoB,SAAQ,SAAyC,CAAA;AApClF,IAAA,WAAA,GAAA;;AAqCW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,aAAa,EAAE,IAAI;AACnB,gBAAA,SAAS,EAAE,IAA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AA;kBATzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,8BAA8B;AAC9B,wBAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC;AACjD,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -7,70 +7,86 @@ import { CommonModule } from '@angular/common';
|
|
|
7
7
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
|
|
9
9
|
class FormlyWrapperFormField extends FieldWrapper {
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyWrapperFormField, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: FormlyWrapperFormField, isStandalone: false, selector: "formly-wrapper-form-field", usesInheritance: true, ngImport: i0, template: `
|
|
12
12
|
<ng-template #labelTemplate>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
@if (props.label && props.hideLabel !== true) {
|
|
14
|
+
<label [attr.for]="id" class="form-label">
|
|
15
|
+
{{ props.label }}
|
|
16
|
+
@if (props.required && props.hideRequiredMarker !== true) {
|
|
17
|
+
<span aria-hidden="true">*</span>
|
|
18
|
+
}
|
|
19
|
+
</label>
|
|
20
|
+
}
|
|
17
21
|
</ng-template>
|
|
18
22
|
|
|
19
23
|
<div [class.form-floating]="props.labelPosition === 'floating'" [class.has-error]="showError">
|
|
20
|
-
|
|
24
|
+
@if (props.labelPosition !== 'floating') {
|
|
21
25
|
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
22
|
-
|
|
26
|
+
}
|
|
23
27
|
|
|
24
28
|
<ng-template #fieldComponent></ng-template>
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
@if (props.labelPosition === 'floating') {
|
|
27
31
|
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@if (showError) {
|
|
35
|
+
<div class="invalid-feedback" [style.display]="'block'">
|
|
36
|
+
<formly-validation-message
|
|
37
|
+
id="{{ id }}-formly-validation-error"
|
|
38
|
+
[field]="field"
|
|
39
|
+
role="alert"
|
|
40
|
+
></formly-validation-message>
|
|
41
|
+
</div>
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@if (props.description) {
|
|
45
|
+
<small class="form-text text-muted">{{ props.description }}</small>
|
|
46
|
+
}
|
|
39
47
|
</div>
|
|
40
|
-
`, isInline: true, styles: [":host{display:block;margin-bottom:1rem}\n"], dependencies: [{ kind: "directive", type: i1.
|
|
48
|
+
`, isInline: true, styles: [":host{display:block;margin-bottom:1rem}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.LegacyFormlyValidationMessage, selector: "formly-validation-message" }] }); }
|
|
41
49
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyWrapperFormField, decorators: [{
|
|
43
51
|
type: Component,
|
|
44
52
|
args: [{ selector: 'formly-wrapper-form-field', template: `
|
|
45
53
|
<ng-template #labelTemplate>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
@if (props.label && props.hideLabel !== true) {
|
|
55
|
+
<label [attr.for]="id" class="form-label">
|
|
56
|
+
{{ props.label }}
|
|
57
|
+
@if (props.required && props.hideRequiredMarker !== true) {
|
|
58
|
+
<span aria-hidden="true">*</span>
|
|
59
|
+
}
|
|
60
|
+
</label>
|
|
61
|
+
}
|
|
50
62
|
</ng-template>
|
|
51
63
|
|
|
52
64
|
<div [class.form-floating]="props.labelPosition === 'floating'" [class.has-error]="showError">
|
|
53
|
-
|
|
65
|
+
@if (props.labelPosition !== 'floating') {
|
|
54
66
|
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
55
|
-
|
|
67
|
+
}
|
|
56
68
|
|
|
57
69
|
<ng-template #fieldComponent></ng-template>
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
@if (props.labelPosition === 'floating') {
|
|
60
72
|
<ng-container [ngTemplateOutlet]="labelTemplate"></ng-container>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@if (showError) {
|
|
76
|
+
<div class="invalid-feedback" [style.display]="'block'">
|
|
77
|
+
<formly-validation-message
|
|
78
|
+
id="{{ id }}-formly-validation-error"
|
|
79
|
+
[field]="field"
|
|
80
|
+
role="alert"
|
|
81
|
+
></formly-validation-message>
|
|
82
|
+
</div>
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@if (props.description) {
|
|
86
|
+
<small class="form-text text-muted">{{ props.description }}</small>
|
|
87
|
+
}
|
|
72
88
|
</div>
|
|
73
|
-
`, styles: [":host{display:block;margin-bottom:1rem}\n"] }]
|
|
89
|
+
`, standalone: false, styles: [":host{display:block;margin-bottom:1rem}\n"] }]
|
|
74
90
|
}] });
|
|
75
91
|
|
|
76
92
|
function withFormlyFormField() {
|
|
@@ -85,11 +101,11 @@ function withFormlyFormField() {
|
|
|
85
101
|
}
|
|
86
102
|
|
|
87
103
|
class FormlyBootstrapFormFieldModule {
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
89
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
90
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
105
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapFormFieldModule, declarations: [FormlyWrapperFormField], imports: [CommonModule, ReactiveFormsModule, i2.FormlyModule] }); }
|
|
106
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapFormFieldModule, imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyFormField())] }); }
|
|
91
107
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapFormFieldModule, decorators: [{
|
|
93
109
|
type: NgModule,
|
|
94
110
|
args: [{
|
|
95
111
|
declarations: [FormlyWrapperFormField],
|
|
@@ -107,10 +123,10 @@ class FieldType extends FieldType$1 {
|
|
|
107
123
|
super();
|
|
108
124
|
this.hostContainerRef = hostContainerRef;
|
|
109
125
|
}
|
|
110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
111
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldType, deps: [{ token: i0.ViewContainerRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
127
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: FieldType, isStandalone: true, viewQueries: [{ propertyName: "content", first: true, predicate: ["fieldTypeTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
|
|
112
128
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldType, decorators: [{
|
|
114
130
|
type: Directive
|
|
115
131
|
}], ctorParameters: () => [{ type: i0.ViewContainerRef, decorators: [{
|
|
116
132
|
type: Optional
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap-form-field.mjs","sources":["../../../../src/ui/bootstrap/form-field/src/form-field.wrapper.ts","../../../../src/ui/bootstrap/form-field/src/form-field.config.ts","../../../../src/ui/bootstrap/form-field/src/form-field.module.ts","../../../../src/ui/bootstrap/form-field/src/field.type.ts","../../../../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
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-form-field.mjs","sources":["../../../../src/ui/bootstrap/form-field/src/form-field.wrapper.ts","../../../../src/ui/bootstrap/form-field/src/form-field.config.ts","../../../../src/ui/bootstrap/form-field/src/form-field.module.ts","../../../../src/ui/bootstrap/form-field/src/field.type.ts","../../../../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 @if (props.label && props.hideLabel !== true) {\n <label [attr.for]=\"id\" class=\"form-label\">\n {{ props.label }}\n @if (props.required && props.hideRequiredMarker !== true) {\n <span aria-hidden=\"true\">*</span>\n }\n </label>\n }\n </ng-template>\n\n <div [class.form-floating]=\"props.labelPosition === 'floating'\" [class.has-error]=\"showError\">\n @if (props.labelPosition !== 'floating') {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <ng-template #fieldComponent></ng-template>\n\n @if (props.labelPosition === 'floating') {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n @if (showError) {\n <div class=\"invalid-feedback\" [style.display]=\"'block'\">\n <formly-validation-message\n id=\"{{ id }}-formly-validation-error\"\n [field]=\"field\"\n role=\"alert\"\n ></formly-validation-message>\n </div>\n }\n\n @if (props.description) {\n <small class=\"form-text text-muted\">{{ props.description }}</small>\n }\n </div>\n `,\n styleUrls: ['./form-field.wrapper.scss'],\n standalone: false,\n})\nexport class FormlyWrapperFormField extends FieldWrapper<FormlyFieldConfig<FormlyFieldProps>> {}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\n\nexport function withFormlyFormField(): ConfigOption {\n return {\n wrappers: [\n {\n name: 'form-field',\n component: FormlyWrapperFormField,\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyWrapperFormField } from './form-field.wrapper';\nimport { withFormlyFormField } from './form-field.config';\n\n@NgModule({\n declarations: [FormlyWrapperFormField],\n imports: [CommonModule, ReactiveFormsModule, FormlyModule.forChild(withFormlyFormField())],\n})\nexport class FormlyBootstrapFormFieldModule {}\n","import { Directive, Optional, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\nimport { FieldType as CoreFieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\n@Directive()\nexport abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> extends CoreFieldType<F> {\n @ViewChild('fieldTypeTemplate', { static: true }) set content(templateRef: TemplateRef<any>) {\n if (templateRef && this.hostContainerRef) {\n this.hostContainerRef.createEmbeddedView(templateRef);\n }\n }\n\n constructor(@Optional() private hostContainerRef?: ViewContainerRef) {\n super();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","CoreFieldType"],"mappings":";;;;;;;;AAoDM,MAAO,sBAAuB,SAAQ,YAAiD,CAAA;+GAAhF,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAzCvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCT,EAAA,C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EAAA,CAAA;sBAA5D,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;ACLlD;;AAEG;;;;"}
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { FieldType, FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';
|
|
4
|
-
import * as i1 from '@angular/
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
import * as i2 from '@angular/forms';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
7
5
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import * as
|
|
6
|
+
import * as i2 from '@ngx-formly/core';
|
|
9
7
|
import { FormlyModule } from '@ngx-formly/core';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
10
9
|
|
|
11
10
|
class FormlyFieldInput extends FieldType {
|
|
12
11
|
get type() {
|
|
13
12
|
return this.props.type || 'text';
|
|
14
13
|
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldInput, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: FormlyFieldInput, isStandalone: false, selector: "formly-field-input", usesInheritance: true, ngImport: i0, template: `
|
|
17
16
|
<ng-template #fieldTypeTemplate>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
@if (type !== 'number') {
|
|
18
|
+
<input
|
|
19
|
+
[type]="type"
|
|
20
|
+
[formControl]="formControl"
|
|
21
|
+
class="form-control"
|
|
22
|
+
[formlyAttributes]="field"
|
|
23
|
+
[class.is-invalid]="showError"
|
|
24
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
25
|
+
[attr.aria-invalid]="showError"
|
|
26
|
+
/>
|
|
27
|
+
} @else {
|
|
29
28
|
<input
|
|
30
29
|
type="number"
|
|
31
30
|
[formControl]="formControl"
|
|
@@ -35,27 +34,27 @@ class FormlyFieldInput extends FieldType {
|
|
|
35
34
|
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
36
35
|
[attr.aria-invalid]="showError"
|
|
37
36
|
/>
|
|
38
|
-
|
|
37
|
+
}
|
|
39
38
|
</ng-template>
|
|
40
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.
|
|
39
|
+
`, isInline: true, dependencies: [{ kind: "directive", 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]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
41
40
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldInput, decorators: [{
|
|
43
42
|
type: Component,
|
|
44
43
|
args: [{
|
|
45
44
|
selector: 'formly-field-input',
|
|
46
45
|
template: `
|
|
47
46
|
<ng-template #fieldTypeTemplate>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
@if (type !== 'number') {
|
|
48
|
+
<input
|
|
49
|
+
[type]="type"
|
|
50
|
+
[formControl]="formControl"
|
|
51
|
+
class="form-control"
|
|
52
|
+
[formlyAttributes]="field"
|
|
53
|
+
[class.is-invalid]="showError"
|
|
54
|
+
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
55
|
+
[attr.aria-invalid]="showError"
|
|
56
|
+
/>
|
|
57
|
+
} @else {
|
|
59
58
|
<input
|
|
60
59
|
type="number"
|
|
61
60
|
[formControl]="formControl"
|
|
@@ -65,10 +64,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
65
64
|
[attr.aria-describedby]="id + '-formly-validation-error'"
|
|
66
65
|
[attr.aria-invalid]="showError"
|
|
67
66
|
/>
|
|
68
|
-
|
|
67
|
+
}
|
|
69
68
|
</ng-template>
|
|
70
69
|
`,
|
|
71
70
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
71
|
+
standalone: false,
|
|
72
72
|
}]
|
|
73
73
|
}] });
|
|
74
74
|
|
|
@@ -104,16 +104,16 @@ function withFormlyFieldInput() {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
class FormlyBootstrapInputModule {
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
108
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
108
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapInputModule, declarations: [FormlyFieldInput], imports: [CommonModule,
|
|
109
109
|
ReactiveFormsModule,
|
|
110
|
-
FormlyBootstrapFormFieldModule,
|
|
111
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
110
|
+
FormlyBootstrapFormFieldModule, i2.FormlyModule] }); }
|
|
111
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapInputModule, imports: [CommonModule,
|
|
112
112
|
ReactiveFormsModule,
|
|
113
113
|
FormlyBootstrapFormFieldModule,
|
|
114
114
|
FormlyModule.forChild(withFormlyFieldInput())] }); }
|
|
115
115
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyBootstrapInputModule, decorators: [{
|
|
117
117
|
type: NgModule,
|
|
118
118
|
args: [{
|
|
119
119
|
declarations: [FormlyFieldInput],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-formly-bootstrap-input.mjs","sources":["../../../../src/ui/bootstrap/input/src/input.type.ts","../../../../src/ui/bootstrap/input/src/input.config.ts","../../../../src/ui/bootstrap/input/src/input.module.ts","../../../../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
|
|
1
|
+
{"version":3,"file":"ngx-formly-bootstrap-input.mjs","sources":["../../../../src/ui/bootstrap/input/src/input.type.ts","../../../../src/ui/bootstrap/input/src/input.config.ts","../../../../src/ui/bootstrap/input/src/input.module.ts","../../../../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 @if (type !== 'number') {\n <input\n [type]=\"type\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n } @else {\n <input\n type=\"number\"\n [formControl]=\"formControl\"\n class=\"form-control\"\n [formlyAttributes]=\"field\"\n [class.is-invalid]=\"showError\"\n [attr.aria-describedby]=\"id + '-formly-validation-error'\"\n [attr.aria-invalid]=\"showError\"\n />\n }\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class FormlyFieldInput extends FieldType<FieldTypeConfig<InputProps>> {\n get type() {\n return this.props.type || 'text';\n }\n}\n","import { ConfigOption } from '@ngx-formly/core';\nimport { FormlyFieldInput } from './input.type';\n\nexport function withFormlyFieldInput(): ConfigOption {\n return {\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n props: {\n type: 'number',\n },\n },\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyBootstrapFormFieldModule } from '@ngx-formly/bootstrap/form-field';\n\nimport { FormlyFieldInput } from './input.type';\nimport { withFormlyFieldInput } from './input.config';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n FormlyBootstrapFormFieldModule,\n FormlyModule.forChild(withFormlyFieldInput()),\n ],\n})\nexport class FormlyBootstrapInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAwCM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAC1E,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM;IAClC;+GAHW,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA5BjB;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,C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