import { ElementRef, OnInit } from '@angular/core'; import { CfListComponent } from '../list/list.component'; import { SelectListModel } from '../../models/list/select-list'; /** *

Select-list is creating using ListModel and SelectListModel Classes/Components and based on Angular Material List. Component must be provided with template for each item and has selectable functionality.

*

Example of using Select-list:

*
 * <cf-select-list [settings]="myList" (cfItemAction)="log($event)"></cf-select-list>
 * 
*/ export declare class CfSelectListComponent extends CfListComponent implements OnInit { elementRef: ElementRef; /** *

Component property to set template of standard view for each list item. Template must be inside cf-select-list html tags.

*

Example:

*
<cf-select-list>
     *        <template #itemTpl let-i="cfIndex" let-it="cfItem">
     *            <img md-list-avatar src="{{it.avatar}}">
     *            <div class="mat-list-text">
     *                 <h4 md-line>{{it.name}}</h4>
     *                 <p md-line>{{it.city}}</p>
     *            </div>
     *        </template>
     * </cf-select-list>
*

Where:

* */ cfSelectList: SelectListModel; /** * It is temprorary array for selected items. Used only inside component logic. */ selected_items: any[]; /** * It is temprorary array for selected items indexes. Used only inside component logic. */ selected_indexes: any[]; /** *

It is Object which will recive data from SelectListModel Class. It is used in cf-select-list template.

*

Example of SelectListModel Class:

*
{
     *        title: 'Select-list Component Demo',
     *        items: [
     *           { name: 'Austin', city: 'London', avatar: 'http://wfarm2.dataknet.com/static/resources/icons/set3/c9f1cdf473a8.png' },
     *           { name: 'Molly', city: 'Denver', avatar: 'http://findicons.com/files/icons/1072/face_avatars/300/fh04.png' },
     *           { name: 'Peter', city: 'Tokyo', avatar: 'http://static.tumblr.com/c172fd03bf2bedb77e13107cb22cdcc1/3rxa3xq/asBo7l3wr/tumblr_static_6fbdkgohxjgoc4c8o8kwoso4k.png' }
     *        ],
     *        selected: this.mySelectedItems,
     *        color: {
     *            checked: 'lightseagreen',
     *            unchecked: 'darkorchid'
     *        }
     * }
*

title: string

* It is title for the List. *

items: array

* It is an array with items of any type. *

selected: array

* It is an array with selected items. *

color: object

* It is an object with two sting values for item background colors in checked/unchecked states. Optional. *

checked: string

* It is item background color in checked state. *

unchecked: string

* It is item background color in unchecked state. */ settings: SelectListModel; /** * It is function to check if item is selected. Used only inside component logic. */ cfItemSelected: (item: Object) => boolean; /** * It is function to select / unselect item. Used only inside component logic. * @param e event on click * @param index index of List item * @param item json object of List item */ /** * It is function to set background color for checked/unchecked item states. Used only inside component logic. * @param state name of item state (checked / unchecked) */ cfSetColor(state: string): string; constructor(elementRef: ElementRef); /** * It will be generated cfSelectList object and rendered inside component template. */ ngOnInit(): void; }