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