@rxap/material-table-system
Version:
This package provides a set of Angular directives, components, and services to enhance and customize Angular Material tables. It includes features such as row selection, column filtering, expandable rows, table actions, and more. The goal is to simplify c
48 lines (47 loc) • 1.77 kB
TypeScript
import { ThemePalette } from '@angular/material/core';
import { RowActionCheckFunction } from './types';
/**
* @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
*/
export declare const RXAP_TABLE_ACTION_METHOD_TYPE_METADATA = "rxap-table-action-method-type-metadata";
export declare const RXAP_TABLE_ACTION_METHOD_METADATA = "rxap-table-action-method-metadata";
/**
* @deprecated use RXAP_TABLE_ACTION_METHOD_METADATA instead
*/
export declare const RXAP_TABLE_ACTION_METHOD_CHECK_FUNCTION_METADATA = "rxap-table-action-method-check-function-metadata";
export interface TableActionMethodOptions<Data = any> {
type?: string;
checkFunction?: RowActionCheckFunction<Data>;
/**
* If true, the table will be refreshed after the action is executed.
*/
refresh?: boolean;
/**
* If true, the user will be asked to confirm the action before execution.
*/
confirm?: boolean;
/**
* The tooltip of the action button.
*/
tooltip?: string;
/**
* The error message that will be displayed if the action fails.
*/
errorMessage?: string;
/**
* The success message that will be displayed if the action succeeds.
*/
successMessage?: string;
/**
* The priority of the action. If multiple action with the same type exists.
* The action with the highest priority will be used. To set the defaults for
* the directive.
*/
priority?: number;
/**
* The color of the action button.
*/
color?: ThemePalette;
}
export declare function TableActionMethod<Data = any>(options: TableActionMethodOptions): ClassDecorator;
export declare function TableActionMethod<Data = any>(type: string, checkFunction?: RowActionCheckFunction<Data>): ClassDecorator;