@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
56 lines (55 loc) • 3.04 kB
TypeScript
import { Overlay } from '@angular/cdk/overlay';
import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
import { MatMiniFabButton } from '@angular/material/button';
import { MatSnackBar } from '@angular/material/snack-bar';
import { MatTooltip } from '@angular/material/tooltip';
import { ConfirmDirective } from '@rxap/components';
import { Method } from '@rxap/pattern';
import { TableDataSourceDirective } from '../table-data-source.directive';
import { TableHeaderButtonMethodOptions } from './decorators';
import * as i0 from "@angular/core";
export declare class TableHeaderButtonDirective<Data extends Record<string, any>> extends ConfirmDirective implements OnInit {
private readonly method;
private readonly snackBar;
private readonly matTooltip;
private readonly matButton;
protected readonly cdr: ChangeDetectorRef;
tableDataSourceDirective: TableDataSourceDirective<Data>;
errorMessage?: string;
successMessage?: string;
/**
* true - after the action is executed the table datasource is refreshed
*/
refresh?: boolean;
protected options: TableHeaderButtonMethodOptions | null;
private _actionDisabled;
private _currentStatus;
constructor(overlay: Overlay, elementRef: ElementRef, method: Method, snackBar: MatSnackBar, matTooltip: MatTooltip | null, matButton: MatMiniFabButton | null, cdr: ChangeDetectorRef);
private _hasConfirmDirective;
set hasConfirmDirective(value: any);
onConfirmed(): Promise<void>;
onClick($event: Event): Promise<void>;
execute(): Promise<void>;
ngOnInit(): void;
/**
* Disables the action. If the button is pressed the action is NOT executed
*
* Hint: the button is set to disabled = true to prevent any conflict with
* extern button enable features linke : rxapHasEnablePermission
* @protected
*/
protected setButtonDisabled(): void;
/**
* Enables the action. If the button is pressed the action is executed
*
* TODO : find a way to communicate the disabled state between the features
* Hint: the button is set to disabled = false to prevent any conflict with
* extern button enable features linke : rxapHasEnablePermission
* @protected
*/
protected setButtonEnabled(): void;
private setStatus;
private getTableHeaderButtonOptions;
static ɵfac: i0.ɵɵFactoryDeclaration<TableHeaderButtonDirective<any>, [null, null, null, null, { optional: true; }, { optional: true; }, null]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TableHeaderButtonDirective<any>, "button[mat-mini-fab][rxapTableHeaderButton]", never, { "tableDataSourceDirective": { "alias": "rxapTableHeaderButton"; "required": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "successMessage": { "alias": "successMessage"; "required": false; }; "refresh": { "alias": "refresh"; "required": false; }; "hasConfirmDirective": { "alias": "rxapConfirm"; "required": false; }; }, {}, never, never, true, never>;
}