aeb-ui-kit 2.1.3 → 2.1.4-mr.483-feature-dp-5446
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/lib/checkbox/checkbox-group/checkbox-group.component.mjs +1 -1
- package/esm2020/lib/checkbox/checkbox.component.mjs +24 -14
- package/fesm2015/aeb-ui-kit.mjs +24 -14
- package/fesm2015/aeb-ui-kit.mjs.map +1 -1
- package/fesm2020/aeb-ui-kit.mjs +24 -14
- package/fesm2020/aeb-ui-kit.mjs.map +1 -1
- package/lib/checkbox/checkbox.component.d.ts +10 -7
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ export class CheckboxGroupComponent {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
CheckboxGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxGroupComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
CheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxGroupComponent, selector: "aeb-checkbox-group", inputs: { checkboxArray: "checkboxArray" }, ngImport: i0, template: "<div class=\"aeb-checkbox-group__header\">\u0413\u0440\u0443\u043F\u043F\u0430 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u043E\u0432</div>\n<form [formGroup]=\"checkboxFormGroup\">\n <aeb-checkbox\n class=\"aeb-checkbox-layout\"\n *ngFor=\"let data of checkboxArray\"\n [id]=\"data.id\"\n [name]=\"data.name\"\n [required]=\"data.required\"\n [isValid]=\"isControlValid(data)\"\n formControlName=\"{{ data.name }}\"\n >\n {{ data.label }}\n </aeb-checkbox>\n</form>\n", styles: [".aeb-checkbox-group__header{margin-bottom:16px;font-size:16px;color:var(--gray-primary)}.aeb-checkbox-layout{margin-bottom:16px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.CheckboxComponent, selector: "aeb-checkbox", inputs: ["id", "isValid", "name"] }] });
|
|
38
|
+
CheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxGroupComponent, selector: "aeb-checkbox-group", inputs: { checkboxArray: "checkboxArray" }, ngImport: i0, template: "<div class=\"aeb-checkbox-group__header\">\u0413\u0440\u0443\u043F\u043F\u0430 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u043E\u0432</div>\n<form [formGroup]=\"checkboxFormGroup\">\n <aeb-checkbox\n class=\"aeb-checkbox-layout\"\n *ngFor=\"let data of checkboxArray\"\n [id]=\"data.id\"\n [name]=\"data.name\"\n [required]=\"data.required\"\n [isValid]=\"isControlValid(data)\"\n formControlName=\"{{ data.name }}\"\n >\n {{ data.label }}\n </aeb-checkbox>\n</form>\n", styles: [".aeb-checkbox-group__header{margin-bottom:16px;font-size:16px;color:var(--gray-primary)}.aeb-checkbox-layout{margin-bottom:16px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.CheckboxComponent, selector: "aeb-checkbox", inputs: ["id", "isChecked", "isDisabled", "isValid", "name"], outputs: ["change"] }] });
|
|
39
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxGroupComponent, decorators: [{
|
|
40
40
|
type: Component,
|
|
41
41
|
args: [{ selector: 'aeb-checkbox-group', template: "<div class=\"aeb-checkbox-group__header\">\u0413\u0440\u0443\u043F\u043F\u0430 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u043E\u0432</div>\n<form [formGroup]=\"checkboxFormGroup\">\n <aeb-checkbox\n class=\"aeb-checkbox-layout\"\n *ngFor=\"let data of checkboxArray\"\n [id]=\"data.id\"\n [name]=\"data.name\"\n [required]=\"data.required\"\n [isValid]=\"isControlValid(data)\"\n formControlName=\"{{ data.name }}\"\n >\n {{ data.label }}\n </aeb-checkbox>\n</form>\n", styles: [".aeb-checkbox-group__header{margin-bottom:16px;font-size:16px;color:var(--gray-primary)}.aeb-checkbox-layout{margin-bottom:16px}\n"] }]
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { Component, forwardRef, HostBinding,
|
|
1
|
+
import { Component, EventEmitter, forwardRef, HostBinding, Input, Output, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export class CheckboxComponent {
|
|
5
5
|
constructor(renderer) {
|
|
6
6
|
this.renderer = renderer;
|
|
7
|
+
this.isChecked = false;
|
|
8
|
+
this.isDisabled = false;
|
|
7
9
|
this.isValid = true;
|
|
8
10
|
this.name = null;
|
|
11
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
12
|
+
this.change = new EventEmitter();
|
|
9
13
|
this.checkBoxClass = true;
|
|
10
|
-
this.isChecked = false;
|
|
11
|
-
this.isDisabled = false;
|
|
12
14
|
this._onChangeFn = () => { };
|
|
13
15
|
this._onTouched = () => { };
|
|
14
16
|
}
|
|
@@ -24,14 +26,12 @@ export class CheckboxComponent {
|
|
|
24
26
|
get checkboxCheckedDisabled() {
|
|
25
27
|
return this.isChecked && this.isDisabled;
|
|
26
28
|
}
|
|
27
|
-
|
|
28
|
-
this._onChangeFn(event.target.checked);
|
|
29
|
-
}
|
|
30
|
-
handleClick(event) {
|
|
29
|
+
handleChange(event) {
|
|
31
30
|
event.stopPropagation();
|
|
32
31
|
this.isChecked = !this.isChecked;
|
|
33
32
|
this._onTouched();
|
|
34
33
|
this._onChangeFn(this.isChecked);
|
|
34
|
+
this.change.emit(event.target.checked);
|
|
35
35
|
}
|
|
36
36
|
writeValue(value) {
|
|
37
37
|
if (value === null || value === '') {
|
|
@@ -50,15 +50,22 @@ export class CheckboxComponent {
|
|
|
50
50
|
this.isDisabled = isDisabled;
|
|
51
51
|
this.renderer.setProperty(this.checkboxInput.nativeElement, 'disabled', isDisabled);
|
|
52
52
|
}
|
|
53
|
+
ngOnChanges(changes) {
|
|
54
|
+
if (changes.isChecked) {
|
|
55
|
+
this._onTouched();
|
|
56
|
+
this._onChangeFn(changes.isChecked.currentValue);
|
|
57
|
+
this.change.emit(changes.isChecked.currentValue);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
53
60
|
}
|
|
54
61
|
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "aeb-checkbox", inputs: { id: "id", isValid: "isValid", name: "name" },
|
|
62
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "aeb-checkbox", inputs: { id: "id", isChecked: "isChecked", isDisabled: "isDisabled", isValid: "isValid", name: "name" }, outputs: { change: "change" }, host: { properties: { "class.aeb-checkbox": "this.checkBoxClass", "class.aeb-checkbox-checked": "this.checkboxChecked", "class.aeb-checkbox-disabled": "this.checkboxDisabled", "class.aeb-checkbox-error": "this.checkboxError", "class.aeb-checkbox-checked-disabled": "this.checkboxCheckedDisabled" } }, providers: [
|
|
56
63
|
{
|
|
57
64
|
provide: NG_VALUE_ACCESSOR,
|
|
58
65
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
59
66
|
multi: true
|
|
60
67
|
}
|
|
61
|
-
], viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["checkbox"], descendants: true, static: true }], ngImport: i0, template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (
|
|
68
|
+
], viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["checkbox"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (change)=\"handleChange($event)\"\n hidden\n />\n <div class=\"aeb-checkbox-indicator\">\n <svg\n width=\"22\"\n height=\"22\"\n viewBox=\"0 0 22 22\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M9 16L4 11.1923L5.4 9.84615L9 13.3077L16.6 6L18 7.34615L9 16V16Z\"\n fill=\"#EEEEEE\"\n />\n </svg>\n </div>\n <div class=\"aeb-checkbox-label\">\n <ng-content></ng-content>\n </div>\n </div>\n</label>\n", styles: [".aeb-checkbox-container{display:inline-flex;align-items:flex-start;justify-content:flex-start;cursor:pointer}.aeb-checkbox-layout{display:flex;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-indicator{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:22px;height:22px;background-color:var(--white);border:2px solid var(--gray-primary);border-radius:4px}.aeb-checkbox-indicator>svg{opacity:0}@media (hover: hover){.aeb-checkbox-indicator:hover{border:2px solid var(--blue-turquoise)}.aeb-checkbox-indicator:active{position:relative;padding:2px;background-image:var(--active-gradient);border:none}.aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:#fff;border-radius:2px}}.aeb-checkbox-label{margin-top:1px;margin-left:12px;font-size:16px;font-style:normal;font-weight:400;line-height:22px;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-checked .aeb-checkbox-indicator{background-color:var(--blue);border-color:var(--blue)}.aeb-checkbox-checked .aeb-checkbox-indicator>svg{opacity:1}@media (hover: hover){.aeb-checkbox-checked .aeb-checkbox-indicator:hover{background-color:var(--blue-turquoise);border:2px solid var(--blue-turquoise)}.aeb-checkbox-checked .aeb-checkbox-indicator:active{background-image:var(--active-gradient)}.aeb-checkbox-checked .aeb-checkbox-indicator:active:hover{background-image:var(--active-gradient);border:none}.aeb-checkbox-checked .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-indicator{border:2px solid var(--gray-primary)}@media (hover: hover){.aeb-checkbox-disabled .aeb-checkbox-indicator:hover{border:2px solid var(--gray-primary)}.aeb-checkbox-disabled .aeb-checkbox-indicator:active{background:white!important;border:2px solid var(--gray-primary)!important}.aeb-checkbox-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-label{opacity:.6}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator{background:var(--gray-primary)}@media (hover: hover){.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:hover{background:var(--gray-primary)}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active{background:var(--gray-primary)!important;border:none!important}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-error .aeb-checkbox-indicator{color:var(--red)!important;border-color:var(--red)!important}.aeb-checkbox-error .aeb-checkbox-label{color:var(--red)!important}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
62
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
63
70
|
type: Component,
|
|
64
71
|
args: [{ selector: 'aeb-checkbox', encapsulation: ViewEncapsulation.None, providers: [
|
|
@@ -67,16 +74,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
67
74
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
68
75
|
multi: true
|
|
69
76
|
}
|
|
70
|
-
], template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (
|
|
77
|
+
], template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (change)=\"handleChange($event)\"\n hidden\n />\n <div class=\"aeb-checkbox-indicator\">\n <svg\n width=\"22\"\n height=\"22\"\n viewBox=\"0 0 22 22\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M9 16L4 11.1923L5.4 9.84615L9 13.3077L16.6 6L18 7.34615L9 16V16Z\"\n fill=\"#EEEEEE\"\n />\n </svg>\n </div>\n <div class=\"aeb-checkbox-label\">\n <ng-content></ng-content>\n </div>\n </div>\n</label>\n", styles: [".aeb-checkbox-container{display:inline-flex;align-items:flex-start;justify-content:flex-start;cursor:pointer}.aeb-checkbox-layout{display:flex;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-indicator{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:22px;height:22px;background-color:var(--white);border:2px solid var(--gray-primary);border-radius:4px}.aeb-checkbox-indicator>svg{opacity:0}@media (hover: hover){.aeb-checkbox-indicator:hover{border:2px solid var(--blue-turquoise)}.aeb-checkbox-indicator:active{position:relative;padding:2px;background-image:var(--active-gradient);border:none}.aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:#fff;border-radius:2px}}.aeb-checkbox-label{margin-top:1px;margin-left:12px;font-size:16px;font-style:normal;font-weight:400;line-height:22px;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-checked .aeb-checkbox-indicator{background-color:var(--blue);border-color:var(--blue)}.aeb-checkbox-checked .aeb-checkbox-indicator>svg{opacity:1}@media (hover: hover){.aeb-checkbox-checked .aeb-checkbox-indicator:hover{background-color:var(--blue-turquoise);border:2px solid var(--blue-turquoise)}.aeb-checkbox-checked .aeb-checkbox-indicator:active{background-image:var(--active-gradient)}.aeb-checkbox-checked .aeb-checkbox-indicator:active:hover{background-image:var(--active-gradient);border:none}.aeb-checkbox-checked .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-indicator{border:2px solid var(--gray-primary)}@media (hover: hover){.aeb-checkbox-disabled .aeb-checkbox-indicator:hover{border:2px solid var(--gray-primary)}.aeb-checkbox-disabled .aeb-checkbox-indicator:active{background:white!important;border:2px solid var(--gray-primary)!important}.aeb-checkbox-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-label{opacity:.6}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator{background:var(--gray-primary)}@media (hover: hover){.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:hover{background:var(--gray-primary)}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active{background:var(--gray-primary)!important;border:none!important}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-error .aeb-checkbox-indicator{color:var(--red)!important;border-color:var(--red)!important}.aeb-checkbox-error .aeb-checkbox-label{color:var(--red)!important}\n"] }]
|
|
71
78
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { checkboxInput: [{
|
|
72
79
|
type: ViewChild,
|
|
73
80
|
args: ['checkbox', { static: true }]
|
|
74
81
|
}], id: [{
|
|
75
82
|
type: Input
|
|
83
|
+
}], isChecked: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], isDisabled: [{
|
|
86
|
+
type: Input
|
|
76
87
|
}], isValid: [{
|
|
77
88
|
type: Input
|
|
78
89
|
}], name: [{
|
|
79
90
|
type: Input
|
|
91
|
+
}], change: [{
|
|
92
|
+
type: Output
|
|
80
93
|
}], checkBoxClass: [{
|
|
81
94
|
type: HostBinding,
|
|
82
95
|
args: ['class.aeb-checkbox']
|
|
@@ -92,8 +105,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
92
105
|
}], checkboxCheckedDisabled: [{
|
|
93
106
|
type: HostBinding,
|
|
94
107
|
args: ['class.aeb-checkbox-checked-disabled']
|
|
95
|
-
}], hostChangeHandler: [{
|
|
96
|
-
type: HostListener,
|
|
97
|
-
args: ['change', ['$event']]
|
|
98
108
|
}] } });
|
|
99
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
109
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3guY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jaGVja2JveC9jaGVja2JveC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NoZWNrYm94L2NoZWNrYm94LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBRVQsWUFBWSxFQUNaLFVBQVUsRUFDVixXQUFXLEVBQ1gsS0FBSyxFQUVMLE1BQU0sRUFJTixTQUFTLEVBQ1QsaUJBQWlCLEVBQ2xCLE1BQU0sZUF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pdiBjbGFzcz1cImFlYi1jaGVja2JveC1pbmRpY2F0b3JcIj5cbiAgICAgIDxzdmdcbiAgICAgICAgd2lkdGg9XCIyMlwiXG4gICAgICAgIGhlaWdodD1cIjIyXCJcbiAgICAgICAgdmlld0JveD1cIjAgMCAyMiAyMlwiXG4gICAgICAgIGZpbGw9XCJub25lXCJcbiAgICAgICAgeG1sbnM9XCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiXG4gICAgICA+XG4gICAgICAgIDxwYXRoXG4gICAgICAgICAgZmlsbC1ydWxlPVwiZXZlbm9kZFwiXG4gICAgICAgICAgY2xpcC1ydWxlPVwiZXZlbm9kZFwiXG4gICAgICAgICAgZD1cIk05IDE2TDQgMTEuMTkyM0w1LjQgOS44NDYxNUw5IDEzLjMwNzdMMTYuNiA2TDE4IDcuMzQ2MTVMOSAxNlYxNlpcIlxuICAgICAgICAgIGZpbGw9XCIjRUVFRUVFXCJcbiAgICAgICAgLz5cbiAgICAgIDwvc3ZnPlxuICAgIDwvZGl2PlxuICAgIDxkaXYgY2xhc3M9XCJhZWItY2hlY2tib3gtbGFiZWxcIj5cbiAgICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L2xhYmVsPlxuIl19
|
package/fesm2015/aeb-ui-kit.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewEncapsulation, Input, ViewChild, NgModule,
|
|
2
|
+
import { Component, ViewEncapsulation, Input, ViewChild, NgModule, EventEmitter, forwardRef, Output, HostBinding, Directive, Optional, Self, HostListener, ContentChild, Injectable, Inject, Pipe, LOCALE_ID, ViewChildren, inject, ChangeDetectorRef, ContentChildren } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, formatDate, formatNumber } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
@@ -93,11 +93,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
93
93
|
class CheckboxComponent {
|
|
94
94
|
constructor(renderer) {
|
|
95
95
|
this.renderer = renderer;
|
|
96
|
+
this.isChecked = false;
|
|
97
|
+
this.isDisabled = false;
|
|
96
98
|
this.isValid = true;
|
|
97
99
|
this.name = null;
|
|
100
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
101
|
+
this.change = new EventEmitter();
|
|
98
102
|
this.checkBoxClass = true;
|
|
99
|
-
this.isChecked = false;
|
|
100
|
-
this.isDisabled = false;
|
|
101
103
|
this._onChangeFn = () => { };
|
|
102
104
|
this._onTouched = () => { };
|
|
103
105
|
}
|
|
@@ -113,14 +115,12 @@ class CheckboxComponent {
|
|
|
113
115
|
get checkboxCheckedDisabled() {
|
|
114
116
|
return this.isChecked && this.isDisabled;
|
|
115
117
|
}
|
|
116
|
-
|
|
117
|
-
this._onChangeFn(event.target.checked);
|
|
118
|
-
}
|
|
119
|
-
handleClick(event) {
|
|
118
|
+
handleChange(event) {
|
|
120
119
|
event.stopPropagation();
|
|
121
120
|
this.isChecked = !this.isChecked;
|
|
122
121
|
this._onTouched();
|
|
123
122
|
this._onChangeFn(this.isChecked);
|
|
123
|
+
this.change.emit(event.target.checked);
|
|
124
124
|
}
|
|
125
125
|
writeValue(value) {
|
|
126
126
|
if (value === null || value === '') {
|
|
@@ -139,15 +139,22 @@ class CheckboxComponent {
|
|
|
139
139
|
this.isDisabled = isDisabled;
|
|
140
140
|
this.renderer.setProperty(this.checkboxInput.nativeElement, 'disabled', isDisabled);
|
|
141
141
|
}
|
|
142
|
+
ngOnChanges(changes) {
|
|
143
|
+
if (changes.isChecked) {
|
|
144
|
+
this._onTouched();
|
|
145
|
+
this._onChangeFn(changes.isChecked.currentValue);
|
|
146
|
+
this.change.emit(changes.isChecked.currentValue);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
142
149
|
}
|
|
143
150
|
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
144
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "aeb-checkbox", inputs: { id: "id", isValid: "isValid", name: "name" },
|
|
151
|
+
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "aeb-checkbox", inputs: { id: "id", isChecked: "isChecked", isDisabled: "isDisabled", isValid: "isValid", name: "name" }, outputs: { change: "change" }, host: { properties: { "class.aeb-checkbox": "this.checkBoxClass", "class.aeb-checkbox-checked": "this.checkboxChecked", "class.aeb-checkbox-disabled": "this.checkboxDisabled", "class.aeb-checkbox-error": "this.checkboxError", "class.aeb-checkbox-checked-disabled": "this.checkboxCheckedDisabled" } }, providers: [
|
|
145
152
|
{
|
|
146
153
|
provide: NG_VALUE_ACCESSOR,
|
|
147
154
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
148
155
|
multi: true
|
|
149
156
|
}
|
|
150
|
-
], viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["checkbox"], descendants: true, static: true }], ngImport: i0, template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (
|
|
157
|
+
], viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["checkbox"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (change)=\"handleChange($event)\"\n hidden\n />\n <div class=\"aeb-checkbox-indicator\">\n <svg\n width=\"22\"\n height=\"22\"\n viewBox=\"0 0 22 22\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M9 16L4 11.1923L5.4 9.84615L9 13.3077L16.6 6L18 7.34615L9 16V16Z\"\n fill=\"#EEEEEE\"\n />\n </svg>\n </div>\n <div class=\"aeb-checkbox-label\">\n <ng-content></ng-content>\n </div>\n </div>\n</label>\n", styles: [".aeb-checkbox-container{display:inline-flex;align-items:flex-start;justify-content:flex-start;cursor:pointer}.aeb-checkbox-layout{display:flex;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-indicator{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:22px;height:22px;background-color:var(--white);border:2px solid var(--gray-primary);border-radius:4px}.aeb-checkbox-indicator>svg{opacity:0}@media (hover: hover){.aeb-checkbox-indicator:hover{border:2px solid var(--blue-turquoise)}.aeb-checkbox-indicator:active{position:relative;padding:2px;background-image:var(--active-gradient);border:none}.aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:#fff;border-radius:2px}}.aeb-checkbox-label{margin-top:1px;margin-left:12px;font-size:16px;font-style:normal;font-weight:400;line-height:22px;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-checked .aeb-checkbox-indicator{background-color:var(--blue);border-color:var(--blue)}.aeb-checkbox-checked .aeb-checkbox-indicator>svg{opacity:1}@media (hover: hover){.aeb-checkbox-checked .aeb-checkbox-indicator:hover{background-color:var(--blue-turquoise);border:2px solid var(--blue-turquoise)}.aeb-checkbox-checked .aeb-checkbox-indicator:active{background-image:var(--active-gradient)}.aeb-checkbox-checked .aeb-checkbox-indicator:active:hover{background-image:var(--active-gradient);border:none}.aeb-checkbox-checked .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-indicator{border:2px solid var(--gray-primary)}@media (hover: hover){.aeb-checkbox-disabled .aeb-checkbox-indicator:hover{border:2px solid var(--gray-primary)}.aeb-checkbox-disabled .aeb-checkbox-indicator:active{background:white!important;border:2px solid var(--gray-primary)!important}.aeb-checkbox-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-label{opacity:.6}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator{background:var(--gray-primary)}@media (hover: hover){.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:hover{background:var(--gray-primary)}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active{background:var(--gray-primary)!important;border:none!important}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-error .aeb-checkbox-indicator{color:var(--red)!important;border-color:var(--red)!important}.aeb-checkbox-error .aeb-checkbox-label{color:var(--red)!important}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
151
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
152
159
|
type: Component,
|
|
153
160
|
args: [{ selector: 'aeb-checkbox', encapsulation: ViewEncapsulation.None, providers: [
|
|
@@ -156,16 +163,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
156
163
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
157
164
|
multi: true
|
|
158
165
|
}
|
|
159
|
-
], template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (
|
|
166
|
+
], template: "<label [attr.for]=\"id\" class=\"aeb-checkbox-layout\">\n <div class=\"aeb-checkbox-container\">\n <input\n #checkbox\n type=\"checkbox\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n (change)=\"handleChange($event)\"\n hidden\n />\n <div class=\"aeb-checkbox-indicator\">\n <svg\n width=\"22\"\n height=\"22\"\n viewBox=\"0 0 22 22\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M9 16L4 11.1923L5.4 9.84615L9 13.3077L16.6 6L18 7.34615L9 16V16Z\"\n fill=\"#EEEEEE\"\n />\n </svg>\n </div>\n <div class=\"aeb-checkbox-label\">\n <ng-content></ng-content>\n </div>\n </div>\n</label>\n", styles: [".aeb-checkbox-container{display:inline-flex;align-items:flex-start;justify-content:flex-start;cursor:pointer}.aeb-checkbox-layout{display:flex;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-indicator{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:22px;height:22px;background-color:var(--white);border:2px solid var(--gray-primary);border-radius:4px}.aeb-checkbox-indicator>svg{opacity:0}@media (hover: hover){.aeb-checkbox-indicator:hover{border:2px solid var(--blue-turquoise)}.aeb-checkbox-indicator:active{position:relative;padding:2px;background-image:var(--active-gradient);border:none}.aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:#fff;border-radius:2px}}.aeb-checkbox-label{margin-top:1px;margin-left:12px;font-size:16px;font-style:normal;font-weight:400;line-height:22px;color:var(--darkblue);-webkit-user-select:none;user-select:none}.aeb-checkbox-checked .aeb-checkbox-indicator{background-color:var(--blue);border-color:var(--blue)}.aeb-checkbox-checked .aeb-checkbox-indicator>svg{opacity:1}@media (hover: hover){.aeb-checkbox-checked .aeb-checkbox-indicator:hover{background-color:var(--blue-turquoise);border:2px solid var(--blue-turquoise)}.aeb-checkbox-checked .aeb-checkbox-indicator:active{background-image:var(--active-gradient)}.aeb-checkbox-checked .aeb-checkbox-indicator:active:hover{background-image:var(--active-gradient);border:none}.aeb-checkbox-checked .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-indicator{border:2px solid var(--gray-primary)}@media (hover: hover){.aeb-checkbox-disabled .aeb-checkbox-indicator:hover{border:2px solid var(--gray-primary)}.aeb-checkbox-disabled .aeb-checkbox-indicator:active{background:white!important;border:2px solid var(--gray-primary)!important}.aeb-checkbox-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-disabled .aeb-checkbox-label{opacity:.6}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator{background:var(--gray-primary)}@media (hover: hover){.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:hover{background:var(--gray-primary)}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active{background:var(--gray-primary)!important;border:none!important}.aeb-checkbox-checked-disabled .aeb-checkbox-indicator:active:before{position:absolute;top:2px;left:2px;z-index:0;width:18px;height:18px;content:\"\";background-color:transparent;border-radius:2px}}.aeb-checkbox-error .aeb-checkbox-indicator{color:var(--red)!important;border-color:var(--red)!important}.aeb-checkbox-error .aeb-checkbox-label{color:var(--red)!important}\n"] }]
|
|
160
167
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { checkboxInput: [{
|
|
161
168
|
type: ViewChild,
|
|
162
169
|
args: ['checkbox', { static: true }]
|
|
163
170
|
}], id: [{
|
|
164
171
|
type: Input
|
|
172
|
+
}], isChecked: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], isDisabled: [{
|
|
175
|
+
type: Input
|
|
165
176
|
}], isValid: [{
|
|
166
177
|
type: Input
|
|
167
178
|
}], name: [{
|
|
168
179
|
type: Input
|
|
180
|
+
}], change: [{
|
|
181
|
+
type: Output
|
|
169
182
|
}], checkBoxClass: [{
|
|
170
183
|
type: HostBinding,
|
|
171
184
|
args: ['class.aeb-checkbox']
|
|
@@ -181,9 +194,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
181
194
|
}], checkboxCheckedDisabled: [{
|
|
182
195
|
type: HostBinding,
|
|
183
196
|
args: ['class.aeb-checkbox-checked-disabled']
|
|
184
|
-
}], hostChangeHandler: [{
|
|
185
|
-
type: HostListener,
|
|
186
|
-
args: ['change', ['$event']]
|
|
187
197
|
}] } });
|
|
188
198
|
|
|
189
199
|
/**
|
|
@@ -218,7 +228,7 @@ class CheckboxGroupComponent {
|
|
|
218
228
|
}
|
|
219
229
|
}
|
|
220
230
|
CheckboxGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxGroupComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
221
|
-
CheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxGroupComponent, selector: "aeb-checkbox-group", inputs: { checkboxArray: "checkboxArray" }, ngImport: i0, template: "<div class=\"aeb-checkbox-group__header\">\u0413\u0440\u0443\u043F\u043F\u0430 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u043E\u0432</div>\n<form [formGroup]=\"checkboxFormGroup\">\n <aeb-checkbox\n class=\"aeb-checkbox-layout\"\n *ngFor=\"let data of checkboxArray\"\n [id]=\"data.id\"\n [name]=\"data.name\"\n [required]=\"data.required\"\n [isValid]=\"isControlValid(data)\"\n formControlName=\"{{ data.name }}\"\n >\n {{ data.label }}\n </aeb-checkbox>\n</form>\n", styles: [".aeb-checkbox-group__header{margin-bottom:16px;font-size:16px;color:var(--gray-primary)}.aeb-checkbox-layout{margin-bottom:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CheckboxComponent, selector: "aeb-checkbox", inputs: ["id", "isValid", "name"] }] });
|
|
231
|
+
CheckboxGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxGroupComponent, selector: "aeb-checkbox-group", inputs: { checkboxArray: "checkboxArray" }, ngImport: i0, template: "<div class=\"aeb-checkbox-group__header\">\u0413\u0440\u0443\u043F\u043F\u0430 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u043E\u0432</div>\n<form [formGroup]=\"checkboxFormGroup\">\n <aeb-checkbox\n class=\"aeb-checkbox-layout\"\n *ngFor=\"let data of checkboxArray\"\n [id]=\"data.id\"\n [name]=\"data.name\"\n [required]=\"data.required\"\n [isValid]=\"isControlValid(data)\"\n formControlName=\"{{ data.name }}\"\n >\n {{ data.label }}\n </aeb-checkbox>\n</form>\n", styles: [".aeb-checkbox-group__header{margin-bottom:16px;font-size:16px;color:var(--gray-primary)}.aeb-checkbox-layout{margin-bottom:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CheckboxComponent, selector: "aeb-checkbox", inputs: ["id", "isChecked", "isDisabled", "isValid", "name"], outputs: ["change"] }] });
|
|
222
232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxGroupComponent, decorators: [{
|
|
223
233
|
type: Component,
|
|
224
234
|
args: [{ selector: 'aeb-checkbox-group', template: "<div class=\"aeb-checkbox-group__header\">\u0413\u0440\u0443\u043F\u043F\u0430 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u043E\u0432</div>\n<form [formGroup]=\"checkboxFormGroup\">\n <aeb-checkbox\n class=\"aeb-checkbox-layout\"\n *ngFor=\"let data of checkboxArray\"\n [id]=\"data.id\"\n [name]=\"data.name\"\n [required]=\"data.required\"\n [isValid]=\"isControlValid(data)\"\n formControlName=\"{{ data.name }}\"\n >\n {{ data.label }}\n </aeb-checkbox>\n</form>\n", styles: [".aeb-checkbox-group__header{margin-bottom:16px;font-size:16px;color:var(--gray-primary)}.aeb-checkbox-layout{margin-bottom:16px}\n"] }]
|