@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
127 lines (126 loc) • 4.95 kB
TypeScript
import { TemplateRef } from '@angular/core';
import { QueryDataItemPresetOption, QueryDataItemValueType } from '../query-editor/query-editor-contract';
import { DataTableSortMode } from './data-table-contract';
import * as i0 from "@angular/core";
/**
* DataTableColumnComponent is template to define column structure for data table. All inputs are optional for minimally functional
* column.
*
* If getTooltipHandler is specified, the data table will use the provided function. Otherwise the default tool tip handler relies on the
* field being defined, else no tooltip will show.
*/
export declare class DataTableColumnComponent {
/**
* The UTA ID used for ui-test-automation
*/
utaId: string;
/**
* The field from the data table item.
*/
field: string;
/**
* The rendering header for the data table column.
*/
header: string;
/**
* It determines whether the column is sortable.
*/
sortable: string;
/**
* The default width.
*/
width: string;
/**
* It determines whether the table column is hidden.
*/
hidden: boolean;
/**
* Handler for tooltip.
*/
getTooltipHandler: (data: any, field?: string) => string;
/**
* The custom compare function used in sorting.
*/
compareFunction: (valueA: any, valueB: any, field: string) => number;
/**
* The override function for filtering.
*/
filterOverridingFunction: (fieldValue: any, entity: any) => string;
/**
* The download processor function to get custom text content.
* This work with where columns are defined by ng-template.
*/
downloadContentProcessor: (fieldValue: any, entity?: any, contextParameters?: any) => string;
/**
* The selection mode, could be single or multiple selection.
*/
selectionMode: string;
/**
* The custom style class that can be passed to the column.
*/
styleClass: string;
/**
* It determines whether the column is searchable.
*/
searchable: boolean;
/**
* The query editor type.
*/
queryEditorType: QueryDataItemValueType;
/**
* The preset query editor options.
*/
queryEditorOptions: QueryDataItemPresetOption;
/**
* By design the operator '=' that defines 'contains'
* We should also supply a way for the user to do the actual 'equal'
* It only works with queryDataItemValueType.TextInput
*/
queryEditorEqualIsContain: boolean;
/**
* The sort mode, ascend or descend.
*/
sortMode: DataTableSortMode;
/**
* The percentage of width that this column can render.
*/
widthPercentage: number;
/**
* The dom width that the column can render.
*/
domWidth: number;
/**
* The template reference.
*/
bodyTemplate: TemplateRef<any>;
/**
* The template reference for #read.
* This is to support the editable data table.
*/
bodyReadTemplate: TemplateRef<any>;
/**
* The template reference for #edit.
* This is to support the editable data table.
*/
bodyEditTemplate: TemplateRef<any>;
/**
* The default function for the download content processor that is just to return the real data.
* @param fieldValue the value of the table cell.
* @returns the string representation of the table cell.
*/
defaultDownloadContentProcessor(fieldValue: string): string;
/**
* It determines whether default tooltip can be used.
* @returns true if default tooltip can be used.
*/
canUseDefaultTooltip(): boolean;
/**
* Default tooltip handler for sme-table-cell - if field exists, return that value in data for the tooltip
* @param data The renderedItem data
* @param field The field to use for the renderedItem data
* @returns Tooltip string
*/
getDefaultTooltipHandler(data: any, field: string): string;
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableColumnComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DataTableColumnComponent, "sme-data-table-column:not([type]), sme-tree-table-column:not([type])", never, { "utaId": "utaId"; "field": "field"; "header": "header"; "sortable": "sortable"; "width": "width"; "hidden": "hidden"; "getTooltipHandler": "getTooltipHandler"; "compareFunction": "compareFunction"; "filterOverridingFunction": "filterOverridingFunction"; "downloadContentProcessor": "downloadContentProcessor"; "selectionMode": "selectionMode"; "styleClass": "styleClass"; "searchable": "searchable"; "queryEditorType": "queryEditorType"; "queryEditorOptions": "queryEditorOptions"; "queryEditorEqualIsContain": "queryEditorEqualIsContain"; }, {}, ["bodyTemplate", "bodyReadTemplate", "bodyEditTemplate"], never, false, never>;
}