@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
94 lines • 6.59 kB
TypeScript
import { EventEmitter, OnDestroy } from '@angular/core';
import { ActionControl, BulkActionControl, Column, DataGridComponent, DataSourceModifier, FilteringActionType, FilteringModifier, HeaderActionControl, LoadMoreMode, Pagination, ProductExperienceEvent, ProductExperienceEventSource, ServerSideDataCallback, ServerSideDataResult } from '@c8y/ngx-components';
import { DataCallback, FilterConfig } from './device-grid.model';
import { DeviceGridService } from './device-grid.service';
import * as i0 from "@angular/core";
export declare class DeviceGridComponent implements OnDestroy, ProductExperienceEventSource {
deviceGridService: DeviceGridService;
/** Optional callback function that allows to modify server side data result before it's rendered. */
dataCallback: DataCallback;
/** Takes an event emitter. When an event is emitted, the grid will be reloaded. */
refresh: EventEmitter<void>;
/** The title for the data grid, it's displayed in the grid's header. */
title: string;
/** The label for load more button. */
loadMoreItemsLabel: "Load more devices";
/** The label for loading indicator. */
loadingItemsLabel: string;
/**
* @deprecated
*
* Internal use only: used to define user preferences key under which 'All devices' column config is stored.
*/
legacyConfigKey: string;
/**
* @deprecated
*
* Internal use only: used to define user preferences key under which 'All devices' filter/sorting config is stored.
*/
legacyFilterKey: string;
/** The list of columns to be displayed in the grid. If not given, it defaults to standard columns. */
columns: Column[];
/** Pagination settings, e.g. allows for setting current page or page size. If not given, defaults to standard settings. */
set _pagination(value: Pagination);
infiniteScroll: LoadMoreMode;
/** Sets load more mode. */
set _infiniteScroll(infiniteScroll: LoadMoreMode);
/** Sets action controls (actions available for individual items). If not given, it defaults to standard actions. */
set _actionControls(value: ActionControl[]);
/** Determines whether items can be selected by clicking a checkbox in the first column. */
selectable: boolean;
/** Restricts selection to a single row only. Selection column displays radio button instead of checkboxes */
singleSelection: boolean;
/** Sets the base query which is appended to the request for data. */
baseQuery: object;
/** Sets bulk action controls (actions available for items selected by user). If not given, it defaults to standard bulk actions. */
set _bulkActionControls(value: BulkActionControl[]);
/** Sets header action controls (actions available from the grid header). If not given, it defaults to empty list of actions. */
set _headerActionControls(value: HeaderActionControl[]);
childDeviceGrid: boolean;
parentDeviceId: string;
/** Sets the withChildren query which is appended to the request. */
withChildren: boolean;
/**
* Enables the search for devices where any device propery is matched agains the search term.
* Enabled by default. This input does not take effect if the <code>childDeviceGrid</code> input is set to <code>true</code>
*/
showSearch: boolean;
/**
* Sets the class name used for active rows (last clicked).
* Set empty string to disable appending active class to grid rows.
*/
activeClassName: string;
/** Emits an event when columns configuration changes. */
onColumnsChange: EventEmitter<Column[]>;
onFilterChange: EventEmitter<FilterConfig[]>;
onDeviceQueryStringChange: EventEmitter<string>;
/** Emits an event when items selection changes. The array contains ids of selected items. */
itemsSelect: EventEmitter<string[]>;
actionControls: ActionControl[];
appliedFilters: FilterConfig[];
pagination: Pagination;
bulkActionControls: BulkActionControl[];
headerActionControls: HeaderActionControl[];
serverSideDataCallback: ServerSideDataCallback;
dataGrid: DataGridComponent;
productExperienceEvent: ProductExperienceEvent;
noResultsMessage: "No matching devices.";
noDataMessage: "No devices to display.";
noResultsSubtitle: "Refine your search terms";
private destroyed$;
constructor(deviceGridService: DeviceGridService);
ngOnDestroy(): void;
trackByName(_index: any, column: Column): string;
onDataSourceModifier(dataSourceModifier: DataSourceModifier): Promise<ServerSideDataResult>;
updateFiltering(columnNames: string[], action: {
type: FilteringActionType;
payload?: {
filteringModifier: FilteringModifier;
};
}): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceGridComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DeviceGridComponent, "c8y-device-grid", never, { "dataCallback": { "alias": "dataCallback"; "required": false; }; "refresh": { "alias": "refresh"; "required": false; }; "title": { "alias": "title"; "required": false; }; "loadMoreItemsLabel": { "alias": "loadMoreItemsLabel"; "required": false; }; "loadingItemsLabel": { "alias": "loadingItemsLabel"; "required": false; }; "legacyConfigKey": { "alias": "legacyConfigKey"; "required": false; }; "legacyFilterKey": { "alias": "legacyFilterKey"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "_pagination": { "alias": "pagination"; "required": false; }; "_infiniteScroll": { "alias": "infiniteScroll"; "required": false; }; "_actionControls": { "alias": "actionControls"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "singleSelection": { "alias": "singleSelection"; "required": false; }; "baseQuery": { "alias": "baseQuery"; "required": false; }; "_bulkActionControls": { "alias": "bulkActionControls"; "required": false; }; "_headerActionControls": { "alias": "headerActionControls"; "required": false; }; "childDeviceGrid": { "alias": "childDeviceGrid"; "required": false; }; "parentDeviceId": { "alias": "parentDeviceId"; "required": false; }; "withChildren": { "alias": "withChildren"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "activeClassName": { "alias": "activeClassName"; "required": false; }; }, { "onColumnsChange": "onColumnsChange"; "onFilterChange": "onFilterChange"; "onDeviceQueryStringChange": "onDeviceQueryStringChange"; "itemsSelect": "itemsSelect"; }, never, never, true, never>;
}
//# sourceMappingURL=device-grid.component.d.ts.map