1 | import { OnInit } from '@angular/core';
|
2 | import { JhiModuleConfig } from '../config';
|
3 | import { JhiConfigService } from '../config.service';
|
4 | /**
|
5 | * This component can be used to display a boolean value by defining the @Input attributes
|
6 | * If an attribute is not provided, default values will be applied (see JhiModuleConfig class)
|
7 | * Have a look at the following examples
|
8 | *
|
9 | * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
10 | *
|
11 | * <jhi-boolean [value]="inputBooleanVariable"></jhi-boolean>
|
12 | *
|
13 | * - Display a green check when inputBooleanVariable is true
|
14 | * - Display a red cross when inputBooleanVariable is false
|
15 | *
|
16 | * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
17 | *
|
18 | * <jhi-boolean
|
19 | * [value]="inputBooleanVariable">
|
20 | * classTrue="fa fa-lg fa-check text-primary"
|
21 | * classFalse="fa fa-lg fa-times text-warning"
|
22 | * </jhi-boolean>
|
23 | *
|
24 | * - Display a blue check when inputBooleanVariable is true
|
25 | * - Display an orange cross when inputBooleanVariable is false
|
26 | *
|
27 | * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
28 | *
|
29 | * <jhi-boolean
|
30 | * [value]="inputBooleanVariable">
|
31 | * classTrue="fa fa-lg fa-check"
|
32 | * classFalse=""
|
33 | * </jhi-boolean>
|
34 | *
|
35 | * - Display a black check when inputBooleanVariable is true
|
36 | * - Do not display anything when inputBooleanVariable is false
|
37 | *
|
38 | * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
39 | *
|
40 | * <jhi-boolean
|
41 | * [value]="inputBooleanVariable"
|
42 | * [textTrue]="'userManagement.activated' | translate"
|
43 | * textFalse="deactivated">
|
44 | * </jhi-boolean>
|
45 | *
|
46 | * - Display a green badge when inputBooleanVariable is true
|
47 | * - Display a red badge when inputBooleanVariable is false
|
48 | *
|
49 | * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
50 | *
|
51 | * <jhi-boolean
|
52 | * [value]="user.activated"
|
53 | * classTrue="badge badge-warning"
|
54 | * classFalse="badge badge-info"
|
55 | * [textTrue]="'userManagement.activated' | translate"
|
56 | * textFalse="deactivated">
|
57 | * </jhi-boolean>
|
58 | *
|
59 | * - Display an orange badge and write 'activated' when inputBooleanVariable is true
|
60 | * - Display a blue badge and write 'deactivated' when inputBooleanVariable is false
|
61 | */
|
62 | export declare class JhiBooleanComponent implements OnInit {
|
63 | /**
|
64 | * the boolean input value
|
65 | */
|
66 | value: boolean;
|
67 | /**
|
68 | * the class(es) (space separated) that will be applied if value is true
|
69 | */
|
70 | classTrue: string;
|
71 | /**
|
72 | * the class(es) (space separated) that will be applied if the input value is false
|
73 | */
|
74 | classFalse: string;
|
75 | /**
|
76 | * the text that will be displayed if the input value is true
|
77 | */
|
78 | textTrue: string;
|
79 | /**
|
80 | * the text that will be displayed if the input value is false
|
81 | */
|
82 | textFalse: string;
|
83 | config: JhiModuleConfig;
|
84 | constructor(configService: JhiConfigService);
|
85 | ngOnInit(): void;
|
86 | }
|