@@ -11,18 +11,21 @@ export class TableDirective implements OnInit {
11
11
static ngAcceptInputType_hover : BooleanInput ;
12
12
static ngAcceptInputType_small : BooleanInput ;
13
13
static ngAcceptInputType_striped : BooleanInput ;
14
+ static ngAcceptInputType_stripedColumns : BooleanInput ;
14
15
15
16
/**
16
17
* Set the vertical alignment.
17
18
* @type string
18
19
* @values 'bottom' | 'middle' | 'top'
19
20
*/
20
21
@Input ( ) align ?: 'bottom' | 'middle' | 'top' ;
22
+
21
23
/**
22
24
* Sets the border color of the component to one of CoreUI’s themed colors.
23
25
* @type Colors
24
26
*/
25
27
@Input ( ) borderColor ?: Colors ;
28
+
26
29
/**
27
30
* Add borders on all sides of the table and cells.
28
31
* @type boolean
@@ -31,10 +34,13 @@ export class TableDirective implements OnInit {
31
34
set bordered ( value : boolean ) {
32
35
this . _bordered = coerceBooleanProperty ( value ) ;
33
36
} ;
37
+
34
38
get bordered ( ) {
35
39
return this . _bordered ;
36
40
}
41
+
37
42
private _bordered = false ;
43
+
38
44
/**
39
45
* Remove borders on all sides of the table and cells.
40
46
* @type boolean
@@ -43,20 +49,25 @@ export class TableDirective implements OnInit {
43
49
set borderless ( value : boolean ) {
44
50
this . _borderless = coerceBooleanProperty ( value ) ;
45
51
} ;
52
+
46
53
get borderless ( ) {
47
54
return this . _borderless ;
48
55
}
56
+
49
57
private _borderless = false ;
58
+
50
59
/**
51
60
* Put the `<caption>` on the top of the table.
52
61
* @values 'top'
53
62
*/
54
63
@Input ( ) caption ?: 'top' ;
64
+
55
65
/**
56
66
* Sets the color context of the component to one of CoreUI’s themed colors.
57
67
* @type Colors
58
68
*/
59
69
@Input ( ) color ?: Colors ;
70
+
60
71
/**
61
72
* Enable a hover state on table rows within table body.
62
73
* @type boolean
@@ -65,15 +76,19 @@ export class TableDirective implements OnInit {
65
76
set hover ( value : boolean ) {
66
77
this . _hover = coerceBooleanProperty ( value ) ;
67
78
} ;
79
+
68
80
get hover ( ) {
69
81
return this . _hover ;
70
82
}
83
+
71
84
private _hover = false ;
85
+
72
86
/**
73
87
* Make table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.
74
88
* @type : {boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'}
75
89
*/
76
90
@Input ( ) responsive ?: boolean | Omit < Breakpoints , 'xs' > ;
91
+
77
92
/**
78
93
* Make table more compact by cutting all cell `padding` in half.
79
94
* @type boolean
@@ -82,23 +97,44 @@ export class TableDirective implements OnInit {
82
97
set small ( value : boolean ) {
83
98
this . _small = coerceBooleanProperty ( value ) ;
84
99
} ;
100
+
85
101
get small ( ) {
86
102
return this . _small ;
87
103
}
104
+
88
105
private _small = false ;
106
+
89
107
/**
90
- * Add zebra-striping to any table row within the table body` .
108
+ * Add zebra-striping to any table row within the table body.
91
109
* @type boolean
92
110
*/
93
111
@Input ( )
94
112
set striped ( value : boolean ) {
95
113
this . _striped = coerceBooleanProperty ( value ) ;
96
114
} ;
115
+
97
116
get striped ( ) {
98
117
return this . _striped ;
99
118
}
119
+
100
120
private _striped = false ;
101
121
122
+ /**
123
+ * Add zebra-striping to any table column.
124
+ * @type boolean
125
+ * @since 4.2.4
126
+ */
127
+ @Input ( )
128
+ set stripedColumns ( value : boolean ) {
129
+ this . _stripedColumns = coerceBooleanProperty ( value ) ;
130
+ } ;
131
+
132
+ get stripedColumns ( ) {
133
+ return this . _stripedColumns ;
134
+ }
135
+
136
+ private _stripedColumns = false ;
137
+
102
138
constructor (
103
139
private renderer : Renderer2 ,
104
140
private hostElement : ElementRef
@@ -116,7 +152,8 @@ export class TableDirective implements OnInit {
116
152
[ `table-${ this . color } ` ] : ! ! this . color ,
117
153
'table-hover' : this . hover ,
118
154
'table-sm' : this . small ,
119
- 'table-striped' : this . striped
155
+ 'table-striped' : this . striped ,
156
+ 'table-striped-columns' : this . stripedColumns
120
157
} ;
121
158
}
122
159
0 commit comments