blob: a899e6daa6902fa1cec6811b1542461e27c07762 (
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
|
import { AsyncValidatorFn, ValidatorFn } from '@angular/forms';
export class CdFormModalFieldConfig {
// --- Generic field properties ---
name: string;
// 'binary' will use cdDimlessBinary directive on input element
// 'select' will use select element
type: 'number' | 'text' | 'binary' | 'select' | 'select-badges';
label?: string;
required?: boolean;
value?: any;
errors?: { [errorName: string]: string };
validators: ValidatorFn[];
asyncValidators?: AsyncValidatorFn[];
// --- Specific field properties ---
typeConfig?: {
[prop: string]: any;
// 'select':
// ---------
// placeholder?: string;
// options?: Array<{
// text: string;
// value: any;
// }>;
//
// 'select-badges':
// ----------------
// customBadges: boolean;
// options: Array<SelectOption>;
// messages: SelectMessages;
};
}
|