@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
75 lines • 2.75 kB
TypeScript
import { OnChanges, SimpleChanges } from '@angular/core';
import { PropertiesListItem } from './properties-list.model';
import { SupportedIconsSuggestions } from '@c8y/ngx-components/icon-selector/icons';
import * as i0 from "@angular/core";
/**
* Renders a list of properties of an object.
*
* ```html
* <c8y-properties-list
* icon="info"
* [properties]="properties"
* [data]="options"
* [emptyLabel]="'-'"
* [title]="'Application properties' | translate"
* ></c8y-properties-list>
* ```
*/
export declare class PropertiesListComponent implements OnChanges {
/**
* The properties that this list should display.
*/
properties: PropertiesListItem[];
/**
* A title for the list.
*/
title: string;
/**
* An icon which is displayed next to the title.
*/
icon: SupportedIconsSuggestions;
/**
* An object where the properties keys are resolved from.
*/
data: object;
/**
* A string array of groups that are shown. If noParse is set to false,
* each complex key will form a group.
*/
groups: string[];
/**
* The component tries to parse the properties and resolve keys and types. You can
* avoid this by setting this property to true.
*/
noParse: boolean;
/**
* Set this label to display all properties but the empty ones
* get the `emptyLabel` assigned. If the empty label is not set,
* defaults to 'c8ydontshow' and it not rendered
*/
emptyLabel: string;
private originalProperties;
/**
* Checks if a certain property has an group associated.
* @param item The property to verify.
*/
hasGroup(item: PropertiesListItem): boolean;
/**
* @ignore
*/
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
/**
* Used in trackBy to avoid recalculation all the time.
* @ignore
*/
identity(index: any, item: any): any;
private parseProperties;
private parsePropertyItem;
private resolveValueFromKey;
private resolveType;
private attachEmptyLabel;
static ɵfac: i0.ɵɵFactoryDeclaration<PropertiesListComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<PropertiesListComponent, "c8y-properties-list", never, { "properties": { "alias": "properties"; "required": false; }; "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "data": { "alias": "data"; "required": false; }; "groups": { "alias": "groups"; "required": false; }; "noParse": { "alias": "noParse"; "required": false; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; }; }, {}, never, never, true, never>;
}
//# sourceMappingURL=properties-list.component.d.ts.map