@3kles/kles-material-dynamicforms 14.0.3 → 14.0.6
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 +24 -24
- package/esm2020/3kles-kles-material-dynamicforms.mjs +4 -4
- package/esm2020/lib/decorators/component.decorator.mjs +7 -7
- package/esm2020/lib/directive/dynamic-component.directive.mjs +44 -44
- package/esm2020/lib/directive/dynamic-field.directive.mjs +50 -50
- package/esm2020/lib/dynamic-form.component.mjs +287 -251
- package/esm2020/lib/enums/type.enum.mjs +19 -19
- package/esm2020/lib/fields/array.component.mjs +57 -57
- package/esm2020/lib/fields/badge.component.mjs +40 -40
- package/esm2020/lib/fields/button-form.component.mjs +44 -44
- package/esm2020/lib/fields/button-submit.component.mjs +38 -38
- package/esm2020/lib/fields/button-toogle-group.component.mjs +51 -51
- package/esm2020/lib/fields/buttonchecker-form.component.mjs +44 -44
- package/esm2020/lib/fields/buttonfile-form.component.mjs +42 -42
- package/esm2020/lib/fields/checkbox.component.mjs +50 -50
- package/esm2020/lib/fields/chip.component.mjs +41 -41
- package/esm2020/lib/fields/color.component.mjs +84 -84
- package/esm2020/lib/fields/date.component.mjs +52 -52
- package/esm2020/lib/fields/field.abstract.mjs +66 -66
- package/esm2020/lib/fields/group.component.mjs +48 -48
- package/esm2020/lib/fields/icon.component.mjs +28 -28
- package/esm2020/lib/fields/input.clearable.component.mjs +112 -112
- package/esm2020/lib/fields/input.component.mjs +158 -158
- package/esm2020/lib/fields/label.component.mjs +40 -40
- package/esm2020/lib/fields/line-break.component.mjs +23 -23
- package/esm2020/lib/fields/link.component.mjs +32 -32
- package/esm2020/lib/fields/list-field.component.mjs +114 -114
- package/esm2020/lib/fields/radio.component.mjs +49 -49
- package/esm2020/lib/fields/select.component.mjs +268 -211
- package/esm2020/lib/fields/select.search.component.mjs +357 -307
- package/esm2020/lib/fields/selection-list.component.mjs +63 -63
- package/esm2020/lib/fields/slide-toggle.component.mjs +43 -43
- package/esm2020/lib/fields/text.component.mjs +40 -40
- package/esm2020/lib/fields/textarea.component.mjs +56 -56
- package/esm2020/lib/forms/button-control.component.mjs +115 -115
- package/esm2020/lib/forms/buttonchecker-control.component.mjs +85 -85
- package/esm2020/lib/forms/buttonfile-control.component.mjs +118 -118
- package/esm2020/lib/interfaces/component.interface.mjs +2 -2
- package/esm2020/lib/interfaces/directive.interface.mjs +2 -2
- package/esm2020/lib/interfaces/field.config.interface.mjs +2 -2
- package/esm2020/lib/interfaces/field.interface.mjs +2 -2
- package/esm2020/lib/interfaces/validator.interface.mjs +2 -2
- package/esm2020/lib/kles-material-dynamicforms.module.mjs +196 -191
- package/esm2020/lib/matcher/form-error.matcher.mjs +16 -16
- package/esm2020/lib/modules/material.module.mjs +278 -278
- package/esm2020/lib/pipe/array.pipe.mjs +22 -22
- package/esm2020/lib/pipe/transform.pipe.mjs +27 -27
- package/esm2020/lib/validators/autocomplete.validator.mjs +23 -23
- package/esm2020/public-api.mjs +59 -59
- package/fesm2015/3kles-kles-material-dynamicforms.mjs +2843 -2700
- package/fesm2015/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/fesm2020/3kles-kles-material-dynamicforms.mjs +2839 -2696
- package/fesm2020/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/decorators/component.decorator.d.ts +8 -8
- package/lib/directive/dynamic-component.directive.d.ts +16 -16
- package/lib/directive/dynamic-field.directive.d.ts +18 -18
- package/lib/dynamic-form.component.d.ts +32 -31
- package/lib/enums/type.enum.d.ts +17 -17
- package/lib/fields/array.component.d.ts +11 -11
- package/lib/fields/badge.component.d.ts +9 -9
- package/lib/fields/button-form.component.d.ts +9 -9
- package/lib/fields/button-submit.component.d.ts +9 -9
- package/lib/fields/button-toogle-group.component.d.ts +11 -11
- package/lib/fields/buttonchecker-form.component.d.ts +9 -9
- package/lib/fields/buttonfile-form.component.d.ts +9 -9
- package/lib/fields/checkbox.component.d.ts +9 -9
- package/lib/fields/chip.component.d.ts +9 -9
- package/lib/fields/color.component.d.ts +10 -10
- package/lib/fields/date.component.d.ts +9 -9
- package/lib/fields/field.abstract.d.ts +21 -21
- package/lib/fields/group.component.d.ts +11 -11
- package/lib/fields/icon.component.d.ts +9 -9
- package/lib/fields/input.clearable.component.d.ts +8 -8
- package/lib/fields/input.component.d.ts +15 -15
- package/lib/fields/label.component.d.ts +9 -9
- package/lib/fields/line-break.component.d.ts +9 -9
- package/lib/fields/link.component.d.ts +9 -9
- package/lib/fields/list-field.component.d.ts +19 -19
- package/lib/fields/radio.component.d.ts +9 -9
- package/lib/fields/select.component.d.ts +20 -19
- package/lib/fields/select.search.component.d.ts +23 -22
- package/lib/fields/selection-list.component.d.ts +11 -11
- package/lib/fields/slide-toggle.component.d.ts +9 -9
- package/lib/fields/text.component.d.ts +9 -9
- package/lib/fields/textarea.component.d.ts +9 -9
- package/lib/forms/button-control.component.d.ts +36 -36
- package/lib/forms/buttonchecker-control.component.d.ts +14 -14
- package/lib/forms/buttonfile-control.component.d.ts +20 -20
- package/lib/interfaces/component.interface.d.ts +5 -5
- package/lib/interfaces/directive.interface.d.ts +3 -3
- package/lib/interfaces/field.config.interface.d.ts +59 -58
- package/lib/interfaces/field.interface.d.ts +7 -7
- package/lib/interfaces/validator.interface.d.ts +5 -5
- package/lib/kles-material-dynamicforms.module.d.ts +56 -47
- package/lib/matcher/form-error.matcher.d.ts +9 -9
- package/lib/modules/material.module.d.ts +42 -42
- package/lib/pipe/array.pipe.d.ts +7 -7
- package/lib/pipe/transform.pipe.d.ts +10 -10
- package/lib/validators/autocomplete.validator.d.ts +3 -3
- package/package.json +1 -3
- package/public-api.d.ts +54 -54
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Component } from "@angular/core";
|
|
2
|
-
import { KlesFieldAbstract } from "./field.abstract";
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/flex-layout/extended";
|
|
6
|
-
import * as i3 from "@angular/material/tooltip";
|
|
7
|
-
export class KlesFormLinkComponent extends KlesFieldAbstract {
|
|
8
|
-
ngOnInit() {
|
|
9
|
-
super.ngOnInit();
|
|
10
|
-
}
|
|
11
|
-
ngOnDestroy() {
|
|
12
|
-
super.ngOnDestroy();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
KlesFormLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
16
|
-
KlesFormLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
17
|
-
<a [href]="group.controls[field.name].value" matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass">
|
|
18
|
-
{{field.label}}
|
|
19
|
-
</a>
|
|
20
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
22
|
-
type: Component,
|
|
23
|
-
args: [{
|
|
24
|
-
selector: 'kles-form-link',
|
|
25
|
-
template: `
|
|
26
|
-
<a [href]="group.controls[field.name].value" matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass">
|
|
27
|
-
{{field.label}}
|
|
28
|
-
</a>
|
|
29
|
-
`
|
|
30
|
-
}]
|
|
31
|
-
}] });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component } from "@angular/core";
|
|
2
|
+
import { KlesFieldAbstract } from "./field.abstract";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@angular/flex-layout/extended";
|
|
6
|
+
import * as i3 from "@angular/material/tooltip";
|
|
7
|
+
export class KlesFormLinkComponent extends KlesFieldAbstract {
|
|
8
|
+
ngOnInit() {
|
|
9
|
+
super.ngOnInit();
|
|
10
|
+
}
|
|
11
|
+
ngOnDestroy() {
|
|
12
|
+
super.ngOnDestroy();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
KlesFormLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KlesFormLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
+
KlesFormLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: KlesFormLinkComponent, selector: "kles-form-link", usesInheritance: true, ngImport: i0, template: `
|
|
17
|
+
<a [href]="group.controls[field.name].value" matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass">
|
|
18
|
+
{{field.label}}
|
|
19
|
+
</a>
|
|
20
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KlesFormLinkComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{
|
|
24
|
+
selector: 'kles-form-link',
|
|
25
|
+
template: `
|
|
26
|
+
<a [href]="group.controls[field.name].value" matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass">
|
|
27
|
+
{{field.label}}
|
|
28
|
+
</a>
|
|
29
|
+
`
|
|
30
|
+
}]
|
|
31
|
+
}] });
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluay5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbGVzLW1hdGVyaWFsLWR5bmFtaWNmb3Jtcy9zcmMvbGliL2ZpZWxkcy9saW5rLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQzs7Ozs7QUFVckQsTUFBTSxPQUFPLHFCQUFzQixTQUFRLGlCQUFpQjtJQUV4RCxRQUFRO1FBQ0osS0FBSyxDQUFDLFFBQVEsRUFBRSxDQUFDO0lBQ3JCLENBQUM7SUFFRCxXQUFXO1FBQ1AsS0FBSyxDQUFDLFdBQ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
2
|
-
import { KlesFieldAbstract } from './field.abstract';
|
|
3
|
-
import { Validators } from '@angular/forms';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/forms";
|
|
6
|
-
import * as i2 from "@angular/common";
|
|
7
|
-
import * as i3 from "@angular/flex-layout/flex";
|
|
8
|
-
import * as i4 from "@angular/material/button";
|
|
9
|
-
import * as i5 from "@angular/material/icon";
|
|
10
|
-
import * as i6 from "@angular/material/form-field";
|
|
11
|
-
import * as i7 from "@ngx-translate/core";
|
|
12
|
-
export class KlesFormListFieldComponent extends KlesFieldAbstract {
|
|
13
|
-
constructor(fb, viewRef) {
|
|
14
|
-
super(viewRef);
|
|
15
|
-
this.fb = fb;
|
|
16
|
-
this.viewRef = viewRef;
|
|
17
|
-
}
|
|
18
|
-
ngOnInit() {
|
|
19
|
-
this.formArray = this.group.controls[this.field.name];
|
|
20
|
-
super.ngOnInit();
|
|
21
|
-
}
|
|
22
|
-
createFormGroup() {
|
|
23
|
-
const group = this.fb.group({});
|
|
24
|
-
this.field.collections.forEach(item => {
|
|
25
|
-
const control = this.fb.control(null, this.bindValidations(item.validations || []), this.bindAsyncValidations(item.asyncValidations || []));
|
|
26
|
-
group.addControl(item.name, control);
|
|
27
|
-
});
|
|
28
|
-
return group;
|
|
29
|
-
}
|
|
30
|
-
deleteField(index) {
|
|
31
|
-
this.formArray.removeAt(index);
|
|
32
|
-
}
|
|
33
|
-
addField() {
|
|
34
|
-
this.formArray.push(this.createFormGroup());
|
|
35
|
-
}
|
|
36
|
-
bindValidations(validations) {
|
|
37
|
-
if (validations.length > 0) {
|
|
38
|
-
const validList = [];
|
|
39
|
-
validations.forEach(valid => {
|
|
40
|
-
validList.push(valid.validator);
|
|
41
|
-
});
|
|
42
|
-
return Validators.compose(validList);
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
bindAsyncValidations(validations) {
|
|
47
|
-
if (validations.length > 0) {
|
|
48
|
-
const validList = [];
|
|
49
|
-
validations.forEach(valid => {
|
|
50
|
-
validList.push(valid.validator);
|
|
51
|
-
});
|
|
52
|
-
return Validators.composeAsync(validList);
|
|
53
|
-
}
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
ngOnDestroy() {
|
|
57
|
-
super.ngOnDestroy();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
KlesFormListFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
61
|
-
KlesFormListFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
62
|
-
<div [formGroup]="group" class="form-element">
|
|
63
|
-
{{field.label | translate}}
|
|
64
|
-
<button mat-icon-button color="primary" (click)="addField()">
|
|
65
|
-
<mat-icon>add</mat-icon>
|
|
66
|
-
</button>
|
|
67
|
-
|
|
68
|
-
<div class="dynamic-form" [formGroupName]="field.name">
|
|
69
|
-
<div *ngFor="let subGroup of formArray.controls let index = index;" fxLayout="row" fxLayoutGap="5px">
|
|
70
|
-
<ng-container *ngFor="let subfield of field.collections;"
|
|
71
|
-
dynamicField [field]="subfield" [group]="subGroup">
|
|
72
|
-
</ng-container>
|
|
73
|
-
<button mat-icon-button (click)="deleteField(index)" color="primary">
|
|
74
|
-
<mat-icon>delete_outlined</mat-icon>
|
|
75
|
-
</button>
|
|
76
|
-
</div>
|
|
77
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
78
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
79
|
-
</ng-container>
|
|
80
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
81
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
82
|
-
</ng-container>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
87
|
-
type: Component,
|
|
88
|
-
args: [{ selector: 'kles-form-listfield', template: `
|
|
89
|
-
<div [formGroup]="group" class="form-element">
|
|
90
|
-
{{field.label | translate}}
|
|
91
|
-
<button mat-icon-button color="primary" (click)="addField()">
|
|
92
|
-
<mat-icon>add</mat-icon>
|
|
93
|
-
</button>
|
|
94
|
-
|
|
95
|
-
<div class="dynamic-form" [formGroupName]="field.name">
|
|
96
|
-
<div *ngFor="let subGroup of formArray.controls let index = index;" fxLayout="row" fxLayoutGap="5px">
|
|
97
|
-
<ng-container *ngFor="let subfield of field.collections;"
|
|
98
|
-
dynamicField [field]="subfield" [group]="subGroup">
|
|
99
|
-
</ng-container>
|
|
100
|
-
<button mat-icon-button (click)="deleteField(index)" color="primary">
|
|
101
|
-
<mat-icon>delete_outlined</mat-icon>
|
|
102
|
-
</button>
|
|
103
|
-
</div>
|
|
104
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
105
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
106
|
-
</ng-container>
|
|
107
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
108
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
109
|
-
</ng-container>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
` }]
|
|
113
|
-
}], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.ViewContainerRef }]; } });
|
|
114
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { KlesFieldAbstract } from './field.abstract';
|
|
3
|
+
import { Validators } from '@angular/forms';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
import * as i2 from "@angular/common";
|
|
7
|
+
import * as i3 from "@angular/flex-layout/flex";
|
|
8
|
+
import * as i4 from "@angular/material/button";
|
|
9
|
+
import * as i5 from "@angular/material/icon";
|
|
10
|
+
import * as i6 from "@angular/material/form-field";
|
|
11
|
+
import * as i7 from "@ngx-translate/core";
|
|
12
|
+
export class KlesFormListFieldComponent extends KlesFieldAbstract {
|
|
13
|
+
constructor(fb, viewRef) {
|
|
14
|
+
super(viewRef);
|
|
15
|
+
this.fb = fb;
|
|
16
|
+
this.viewRef = viewRef;
|
|
17
|
+
}
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
this.formArray = this.group.controls[this.field.name];
|
|
20
|
+
super.ngOnInit();
|
|
21
|
+
}
|
|
22
|
+
createFormGroup() {
|
|
23
|
+
const group = this.fb.group({});
|
|
24
|
+
this.field.collections.forEach(item => {
|
|
25
|
+
const control = this.fb.control(null, this.bindValidations(item.validations || []), this.bindAsyncValidations(item.asyncValidations || []));
|
|
26
|
+
group.addControl(item.name, control);
|
|
27
|
+
});
|
|
28
|
+
return group;
|
|
29
|
+
}
|
|
30
|
+
deleteField(index) {
|
|
31
|
+
this.formArray.removeAt(index);
|
|
32
|
+
}
|
|
33
|
+
addField() {
|
|
34
|
+
this.formArray.push(this.createFormGroup());
|
|
35
|
+
}
|
|
36
|
+
bindValidations(validations) {
|
|
37
|
+
if (validations.length > 0) {
|
|
38
|
+
const validList = [];
|
|
39
|
+
validations.forEach(valid => {
|
|
40
|
+
validList.push(valid.validator);
|
|
41
|
+
});
|
|
42
|
+
return Validators.compose(validList);
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
bindAsyncValidations(validations) {
|
|
47
|
+
if (validations.length > 0) {
|
|
48
|
+
const validList = [];
|
|
49
|
+
validations.forEach(valid => {
|
|
50
|
+
validList.push(valid.validator);
|
|
51
|
+
});
|
|
52
|
+
return Validators.composeAsync(validList);
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
ngOnDestroy() {
|
|
57
|
+
super.ngOnDestroy();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
KlesFormListFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KlesFormListFieldComponent, deps: [{ token: i1.UntypedFormBuilder }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
61
|
+
KlesFormListFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: KlesFormListFieldComponent, selector: "kles-form-listfield", usesInheritance: true, ngImport: i0, template: `
|
|
62
|
+
<div [formGroup]="group" class="form-element">
|
|
63
|
+
{{field.label | translate}}
|
|
64
|
+
<button mat-icon-button color="primary" (click)="addField()">
|
|
65
|
+
<mat-icon>add</mat-icon>
|
|
66
|
+
</button>
|
|
67
|
+
|
|
68
|
+
<div class="dynamic-form" [formGroupName]="field.name">
|
|
69
|
+
<div *ngFor="let subGroup of formArray.controls let index = index;" fxLayout="row" fxLayoutGap="5px">
|
|
70
|
+
<ng-container *ngFor="let subfield of field.collections;"
|
|
71
|
+
dynamicField [field]="subfield" [group]="subGroup">
|
|
72
|
+
</ng-container>
|
|
73
|
+
<button mat-icon-button (click)="deleteField(index)" color="primary">
|
|
74
|
+
<mat-icon>delete_outlined</mat-icon>
|
|
75
|
+
</button>
|
|
76
|
+
</div>
|
|
77
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
78
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
79
|
+
</ng-container>
|
|
80
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
81
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
82
|
+
</ng-container>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KlesFormListFieldComponent, decorators: [{
|
|
87
|
+
type: Component,
|
|
88
|
+
args: [{ selector: 'kles-form-listfield', template: `
|
|
89
|
+
<div [formGroup]="group" class="form-element">
|
|
90
|
+
{{field.label | translate}}
|
|
91
|
+
<button mat-icon-button color="primary" (click)="addField()">
|
|
92
|
+
<mat-icon>add</mat-icon>
|
|
93
|
+
</button>
|
|
94
|
+
|
|
95
|
+
<div class="dynamic-form" [formGroupName]="field.name">
|
|
96
|
+
<div *ngFor="let subGroup of formArray.controls let index = index;" fxLayout="row" fxLayoutGap="5px">
|
|
97
|
+
<ng-container *ngFor="let subfield of field.collections;"
|
|
98
|
+
dynamicField [field]="subfield" [group]="subGroup">
|
|
99
|
+
</ng-container>
|
|
100
|
+
<button mat-icon-button (click)="deleteField(index)" color="primary">
|
|
101
|
+
<mat-icon>delete_outlined</mat-icon>
|
|
102
|
+
</button>
|
|
103
|
+
</div>
|
|
104
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
105
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
106
|
+
</ng-container>
|
|
107
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
108
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
109
|
+
</ng-container>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
` }]
|
|
113
|
+
}], ctorParameters: function () { return [{ type: i1.UntypedFormBuilder }, { type: i0.ViewContainerRef }]; } });
|
|
114
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbGVzLW1hdGVyaWFsLWR5bmFtaWNmb3Jtcy9zcmMvbGliL2ZpZWxkcy9saXN0LWZpZWxkLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUF1QyxNQUFNLGVBQWUsQ0FBQztBQUMvRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNyRCxPQUFPLEVBQXVFLFVBQVUsRUFB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AgICAgICB0aGlzLmZpZWxkLmNvbGxlY3Rpb25zLmZvckVhY2goaXRlbSA9PiB7XG4gICAgICAgICAgICBjb25zdCBjb250cm9sID0gdGhpcy5mYi5jb250cm9sKFxuICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgdGhpcy5iaW5kVmFsaWRhdGlvbnMoaXRlbS52YWxpZGF0aW9ucyB8fCBbXSksXG4gICAgICAgICAgICAgICAgdGhpcy5iaW5kQXN5bmNWYWxpZGF0aW9ucyhpdGVtLmFzeW5jVmFsaWRhdGlvbnMgfHwgW10pXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgZ3JvdXAuYWRkQ29udHJvbChpdGVtLm5hbWUsIGNvbnRyb2wpO1xuXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBncm91cDtcblxuICAgIH1cblxuICAgIGRlbGV0ZUZpZWxkKGluZGV4OiBudW1iZXIpIHtcbiAgICAgICAgdGhpcy5mb3JtQXJyYXkucmVtb3ZlQXQoaW5kZXgpO1xuICAgIH1cblxuICAgIGFkZEZpZWxkKCkge1xuICAgICAgICB0aGlzLmZvcm1BcnJheS5wdXNoKHRoaXMuY3JlYXRlRm9ybUdyb3VwKCkpO1xuICAgIH1cblxuXG4gICAgcHJpdmF0ZSBiaW5kVmFsaWRhdGlvbnModmFsaWRhdGlvbnM6IElLbGVzVmFsaWRhdG9yPFZhbGlkYXRvckZuPltdKTogVmFsaWRhdG9yRm4ge1xuICAgICAgICBpZiAodmFsaWRhdGlvbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgY29uc3QgdmFsaWRMaXN0ID0gW107XG4gICAgICAgICAgICB2YWxpZGF0aW9ucy5mb3JFYWNoKHZhbGlkID0+IHtcbiAgICAgICAgICAgICAgICB2YWxpZExpc3QucHVzaCh2YWxpZC52YWxpZGF0b3IpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gVmFsaWRhdG9ycy5jb21wb3NlKHZhbGlkTGlzdCk7XG5cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cblxuICAgIHByaXZhdGUgYmluZEFzeW5jVmFsaWRhdGlvbnModmFsaWRhdGlvbnM6IElLbGVzVmFsaWRhdG9yPEFzeW5jVmFsaWRhdG9yRm4+W10pOiBBc3luY1ZhbGlkYXRvckZuIHtcbiAgICAgICAgaWYgKHZhbGlkYXRpb25zLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbGlkTGlzdCA9IFtdO1xuICAgICAgICAgICAgdmFsaWRhdGlvbnMuZm9yRWFjaCh2YWxpZCA9PiB7XG4gICAgICAgICAgICAgICAgdmFsaWRMaXN0LnB1c2godmFsaWQudmFsaWRhdG9yKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmV0dXJuIFZhbGlkYXRvcnMuY29tcG9zZUFzeW5jKHZhbGlkTGlzdCk7XG5cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICAgICAgc3VwZXIubmdPbkRlc3Ryb3koKTtcbiAgICB9XG59XG5cbiJdfQ==
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { KlesFieldAbstract } from './field.abstract';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "@angular/forms";
|
|
6
|
-
import * as i3 from "@angular/flex-layout/extended";
|
|
7
|
-
import * as i4 from "@angular/material/form-field";
|
|
8
|
-
import * as i5 from "@angular/material/radio";
|
|
9
|
-
import * as i6 from "@angular/material/tooltip";
|
|
10
|
-
import * as i7 from "@ngx-translate/core";
|
|
11
|
-
export class KlesFormRadioComponent extends KlesFieldAbstract {
|
|
12
|
-
ngOnInit() { super.ngOnInit(); }
|
|
13
|
-
ngOnDestroy() {
|
|
14
|
-
super.ngOnDestroy();
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
KlesFormRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
18
|
-
KlesFormRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
19
|
-
<div [formGroup]="group">
|
|
20
|
-
<label class="radio-label-padding">{{field.label}}</label>
|
|
21
|
-
<mat-radio-group matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name">
|
|
22
|
-
<mat-radio-button *ngFor="let item of field.options" [value]="item">{{item}}</mat-radio-button>
|
|
23
|
-
</mat-radio-group>
|
|
24
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
25
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
26
|
-
</ng-container>
|
|
27
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
28
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
29
|
-
</ng-container>
|
|
30
|
-
</div>
|
|
31
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i5.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
33
|
-
type: Component,
|
|
34
|
-
args: [{ selector: 'kles-form-radiobutton', template: `
|
|
35
|
-
<div [formGroup]="group">
|
|
36
|
-
<label class="radio-label-padding">{{field.label}}</label>
|
|
37
|
-
<mat-radio-group matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name">
|
|
38
|
-
<mat-radio-button *ngFor="let item of field.options" [value]="item">{{item}}</mat-radio-button>
|
|
39
|
-
</mat-radio-group>
|
|
40
|
-
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
41
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
42
|
-
</ng-container>
|
|
43
|
-
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
44
|
-
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
45
|
-
</ng-container>
|
|
46
|
-
</div>
|
|
47
|
-
` }]
|
|
48
|
-
}] });
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { KlesFieldAbstract } from './field.abstract';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@angular/forms";
|
|
6
|
+
import * as i3 from "@angular/flex-layout/extended";
|
|
7
|
+
import * as i4 from "@angular/material/form-field";
|
|
8
|
+
import * as i5 from "@angular/material/radio";
|
|
9
|
+
import * as i6 from "@angular/material/tooltip";
|
|
10
|
+
import * as i7 from "@ngx-translate/core";
|
|
11
|
+
export class KlesFormRadioComponent extends KlesFieldAbstract {
|
|
12
|
+
ngOnInit() { super.ngOnInit(); }
|
|
13
|
+
ngOnDestroy() {
|
|
14
|
+
super.ngOnDestroy();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
KlesFormRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KlesFormRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
KlesFormRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: KlesFormRadioComponent, selector: "kles-form-radiobutton", usesInheritance: true, ngImport: i0, template: `
|
|
19
|
+
<div [formGroup]="group">
|
|
20
|
+
<label class="radio-label-padding">{{field.label}}</label>
|
|
21
|
+
<mat-radio-group matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name">
|
|
22
|
+
<mat-radio-button *ngFor="let item of field.options" [value]="item">{{item}}</mat-radio-button>
|
|
23
|
+
</mat-radio-group>
|
|
24
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
25
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
26
|
+
</ng-container>
|
|
27
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
28
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
29
|
+
</ng-container>
|
|
30
|
+
</div>
|
|
31
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: i5.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: KlesFormRadioComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{ selector: 'kles-form-radiobutton', template: `
|
|
35
|
+
<div [formGroup]="group">
|
|
36
|
+
<label class="radio-label-padding">{{field.label}}</label>
|
|
37
|
+
<mat-radio-group matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name">
|
|
38
|
+
<mat-radio-button *ngFor="let item of field.options" [value]="item">{{item}}</mat-radio-button>
|
|
39
|
+
</mat-radio-group>
|
|
40
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
41
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
42
|
+
</ng-container>
|
|
43
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
44
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
45
|
+
</ng-container>
|
|
46
|
+
</div>
|
|
47
|
+
` }]
|
|
48
|
+
}] });
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8uY29tcG9uZW50LmpzIiwic291cmNlUm9vd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