carbon-components-angular
Version:
Next generation components
77 lines (73 loc) • 2.15 kB
TypeScript
/*!
*
* Neutrino v0.0.0 | list-group.component.d.ts
*
* Copyright 2014, 2018 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { EventEmitter, TemplateRef } from "@angular/core";
/**
* `listTpl` binds `item` to the template context
*
* `items` expects an array of objects where the objects follow the format:
* ```javascript
* {
* content: "string",
* selected: false,
* disabled: false //optional
* }
* ```
*
* @export
* @class ListGroup
*/
export declare class ListGroup {
/**
* The list items belonging to the `ListGroup`.
* @type {Array<Object>}
* @memberof ListGroup
*/
items: Array<Object>;
/**
* Template to bind to items in the `ListGroup` (optional).
* @type {(string | TemplateRef<any>)}
* @memberof ListGroup
*/
listTpl: string | TemplateRef<any>;
/**
* Set to `true` for the `ListGroup` to have checkmark selection.
* @type {boolean}
* @memberof ListGroup
*/
checkMark: Boolean;
/**
* Event to emit selection of a list item within the `ListGroup`.
* @type {EventEmitter<Object>}
* @memberof ListGroup
*/
selected: EventEmitter<Object>;
/**
* Controls keyboard navigation and selection within the `ListGroup`.
* @param {any} ev
* @param {any} item
* @memberof ListGroup
*/
doKeyDown(ev: any, item: any): void;
/**
* Selects the `item` parameter from the `ListGroup` if it is not disabled and emits the selection event.
* @param {any} ev
* @param {any} item
* @memberof ListGroup
*/
doClick(ev: any, item: any): void;
}