@@ -19,10 +19,6 @@ import {ListableObject} from '../object-collection/shared/listable-object.model'
1919 templateUrl : '../theme-support/themed.component.html' ,
2020} )
2121export class ThemedObjectListComponent extends ThemedComponent < ObjectListComponent > {
22- /**
23- * The view mode of the this component
24- */
25- viewMode = ViewMode . ListElement ;
2622
2723 /**
2824 * The current pagination configuration
@@ -37,18 +33,20 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
3733 /**
3834 * Whether or not the list elements have a border
3935 */
40- @Input ( ) hasBorder = false ;
36+ @Input ( ) hasBorder : boolean ;
4137
4238 /**
4339 * The whether or not the gear is hidden
4440 */
45- @Input ( ) hideGear = false ;
41+ @Input ( ) hideGear : boolean ;
4642
4743 /**
4844 * Whether or not the pager is visible when there is only a single page of results
4945 */
50- @Input ( ) hidePagerWhenSinglePage = true ;
51- @Input ( ) selectable = false ;
46+ @Input ( ) hidePagerWhenSinglePage : boolean ;
47+
48+ @Input ( ) selectable : boolean ;
49+
5250 @Input ( ) selectionConfig : { repeatable : boolean , listId : string } ;
5351
5452 /**
@@ -64,12 +62,12 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
6462 /**
6563 * Option for hiding the pagination detail
6664 */
67- @Input ( ) hidePaginationDetail = false ;
65+ @Input ( ) hidePaginationDetail : boolean ;
6866
6967 /**
7068 * Whether or not to add an import button to the object
7169 */
72- @Input ( ) importable = false ;
70+ @Input ( ) importable : boolean ;
7371
7472 /**
7573 * Config used for the import button
@@ -79,42 +77,24 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
7977 /**
8078 * Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
8179 */
82- @Input ( ) showPaginator = true ;
80+ @Input ( ) showPaginator : boolean ;
8381
8482 /**
8583 * Emit when one of the listed object has changed.
8684 */
87- @Output ( ) contentChange = new EventEmitter < any > ( ) ;
85+ @Output ( ) contentChange : EventEmitter < any > = new EventEmitter ( ) ;
8886
8987 /**
9088 * If showPaginator is set to true, emit when the previous button is clicked
9189 */
92- @Output ( ) prev = new EventEmitter < boolean > ( ) ;
90+ @Output ( ) prev : EventEmitter < boolean > = new EventEmitter ( ) ;
9391
9492 /**
9593 * If showPaginator is set to true, emit when the next button is clicked
9694 */
97- @Output ( ) next = new EventEmitter < boolean > ( ) ;
98-
99- /**
100- * The current listable objects
101- */
102- private _objects : RemoteData < PaginatedList < ListableObject > > ;
103-
104- /**
105- * Setter for the objects
106- * @param objects The new objects
107- */
108- @Input ( ) set objects ( objects : RemoteData < PaginatedList < ListableObject > > ) {
109- this . _objects = objects ;
110- }
95+ @Output ( ) next : EventEmitter < boolean > = new EventEmitter ( ) ;
11196
112- /**
113- * Getter to return the current objects
114- */
115- get objects ( ) {
116- return this . _objects ;
117- }
97+ @Input ( ) objects : RemoteData < PaginatedList < ListableObject > > ;
11898
11999 /**
120100 * An event fired when the page is changed.
@@ -123,48 +103,45 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
123103 @Output ( ) change : EventEmitter < {
124104 pagination : PaginationComponentOptions ,
125105 sort : SortOptions
126- } > = new EventEmitter < {
127- pagination : PaginationComponentOptions ,
128- sort : SortOptions
129- } > ( ) ;
106+ } > = new EventEmitter ( ) ;
130107
131108 /**
132109 * An event fired when the page is changed.
133110 * Event's payload equals to the newly selected page.
134111 */
135- @Output ( ) pageChange : EventEmitter < number > = new EventEmitter < number > ( ) ;
112+ @Output ( ) pageChange : EventEmitter < number > = new EventEmitter ( ) ;
136113
137114 /**
138115 * An event fired when the page wsize is changed.
139116 * Event's payload equals to the newly selected page size.
140117 */
141- @Output ( ) pageSizeChange : EventEmitter < number > = new EventEmitter < number > ( ) ;
118+ @Output ( ) pageSizeChange : EventEmitter < number > = new EventEmitter ( ) ;
142119
143120 /**
144121 * An event fired when the sort direction is changed.
145122 * Event's payload equals to the newly selected sort direction.
146123 */
147- @Output ( ) sortDirectionChange : EventEmitter < SortDirection > = new EventEmitter < SortDirection > ( ) ;
124+ @Output ( ) sortDirectionChange : EventEmitter < SortDirection > = new EventEmitter ( ) ;
148125
149126 /**
150127 * An event fired when on of the pagination parameters changes
151128 */
152- @Output ( ) paginationChange : EventEmitter < any > = new EventEmitter < any > ( ) ;
129+ @Output ( ) paginationChange : EventEmitter < any > = new EventEmitter ( ) ;
153130
154- @Output ( ) deselectObject : EventEmitter < ListableObject > = new EventEmitter < ListableObject > ( ) ;
131+ @Output ( ) deselectObject : EventEmitter < ListableObject > = new EventEmitter ( ) ;
155132
156- @Output ( ) selectObject : EventEmitter < ListableObject > = new EventEmitter < ListableObject > ( ) ;
133+ @Output ( ) selectObject : EventEmitter < ListableObject > = new EventEmitter ( ) ;
157134
158135 /**
159136 * Send an import event to the parent component
160137 */
161- @Output ( ) importObject : EventEmitter < ListableObject > = new EventEmitter < ListableObject > ( ) ;
138+ @Output ( ) importObject : EventEmitter < ListableObject > = new EventEmitter ( ) ;
162139
163140 /**
164141 * An event fired when the sort field is changed.
165142 * Event's payload equals to the newly selected sort field.
166143 */
167- @Output ( ) sortFieldChange : EventEmitter < string > = new EventEmitter < string > ( ) ;
144+ @Output ( ) sortFieldChange : EventEmitter < string > = new EventEmitter ( ) ;
168145
169146 inAndOutputNames : ( keyof ObjectListComponent & keyof this) [ ] = [
170147 'config' ,
0 commit comments