blob: b44ecd7e49d9be03f89897ee44f53a6bd3949b63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { ValidatorFn } from '@angular/forms';
import { Icons } from '~/app/shared/enum/icons.enum';
import { SelectMessages } from '../select/select-messages.model';
import { SelectOption } from '../select/select-option.model';
import { SelectComponent } from '../select/select.component';
@Component({
selector: 'cd-select-badges',
templateUrl: './select-badges.component.html',
styleUrls: ['./select-badges.component.scss']
})
export class SelectBadgesComponent {
@Input()
data: Array<string> = [];
@Input()
options: Array<SelectOption> = [];
@Input()
messages = new SelectMessages({});
@Input()
selectionLimit: number;
@Input()
customBadges = false;
@Input()
customBadgeValidators: ValidatorFn[] = [];
@Output()
selection = new EventEmitter();
@ViewChild('cdSelect', { static: true })
cdSelect: SelectComponent;
icons = Icons;
}
|