element which contains filters for your table, if any.
*/
filterSelector?: string | HTMLElement;
/**
* Optional: Base url to embla icons. Used for pagination arrows. Default is "/dist/icons"
*/
iconBaseUrl?: string;
/**
* Optional: Override default language settings (default is danish)
*/
language?: DataTables.LanguageSettings;
/**
* Optional: Responsive behavior(default is false)
*/
responsive?: boolean;
/**
* Optional: This settings enables checkbox on rows the actions is supplied with HTML (default is false)
*/
actions?: {
actionsSelector: string | HTMLElement;
selectedTextSingle: string;
selectedTextPlural: string;
};
/**
* Optional: Experimental, use with caution! Moves filters into a modal, and displays a filter button to toggle the modal
*/
filtersAsModal?: IFiltersAsModal;
/**
* Optional: Override additional datatable settings. Does not override datatable settings defined in ITableModuleOptions.
*/
additionalDatatableSettings?: DataTables.Settings;
/**
* Optional: This setting defines what is to be shown when there are no results in the table.
*/
noResults?: {
noResultsMessage?: string;
noResultsIllustrationName?: string;
};
}
declare type FiltersInModal = "auto" | "always" | "never";
interface IFiltersAsModal {
/**
* Defines if the filters should be displayed in a modal. Values are: "auto", "always" and "never".
*/
filtersInModal: FiltersInModal;
/**
* Optional: Defines the breakpoint width in pixels at which the modal filter should be activated. If not provided, it will be activated below 992px (md).
*/
breakpoint?: number | FiltersInModalBreakpoint;
/**
* Optional: Text of the modal title. If not provided, the text will be "Filter"
*/
modalTitle?: string;
/**
* Optional: Text of the close modal button. If not provided, the text will be "Luk"
*/
modalButtonText?: string;
/**
* Optional: Text of the filter button. If not provided, the text will be "Filtrer"
*/
filterButtonText?: string;
/**
* Optional: Size of the modal. If not provided, the modal size will be "sm"
*/
modalSize?: "default" | "sm" | "lg" | "xl";
}
export declare enum FiltersInModalBreakpoint {
Xs = 0,
Sm = 768,
Md = 992,
Lg = 1200
}
/**
* Embla table modules which is based upon datatables
*/
export declare class TableModule {
/**
* Static method to hide overflow while changing the width of the table.
*/
static hideOverflow(): void;
/**
* Static method to show overflow when change of the width of the table is done.
*/
static showOverflow(): void;
/**
* Static method to recalc size if windows doesnt change
*/
static resize(): void;
private datatablesApi;
/**
* Constructor for table, which initialises the module
*/
constructor(options: ITableModuleOptions);
getDatatablesApi(): DataTables.Api
;
/**
* Filter the table by matching a given column's data with the given filter value
* @param columnIndex 0 based index of the column to filter
* @param filterValue Value to filter by
* @param matchEntireColumn If the value should match the entire column
* @param caseSensitive If the filter should be case sensitive
*/
filterColumn(columnIndex: number, filterValue: string, matchEntireColumn?: boolean, caseSensitive?: boolean): void;
getAllSelectedRows(): DataTables.Api;
private setUniqueTableUuid;
private trySetFiltersFromState;
private initModule;
private initCustomFilterDropdowns;
private initFiltersAsModalAlways;
private initFilterAsModalAuto;
private createFilterButtonWrapper;
private addFilterButtonToTable;
private createFilterButtonHtml;
private bindFilterButtonInTable;
private toggleFiltersInModalAtBreakpoint;
private showFiltersInModal;
private moveSearchFilterToModal;
private showFiltersInTable;
private moveCustomFiltersFromTableToModal;
private moveCustomFiltersFromModalToTable;
private moveCustomFilters;
private bindWindowResize;
private isWidthBelowOrEqualToBreakpoint;
private getCurrentWindowWidth;
private debounce;
private initNoResults;
private addSelectAllRowsCheckbox;
private initResponsive;
private toggleResponsiveState;
private bindExpansionOnExpandArrows;
private addResponsive;
private removeResponsive;
private hideAllExpandArrows;
private showAllExpandArrows;
private findAllExpandArrows;
private getLanguage;
private createEmptyTableTemplate;
private initActions;
private updateActionsRow;
private getResponsiveSettings;
private getDom;
private generateColumnDef;
private createExpandArrowHtml;
private createActionCheckboxHtml;
private getElementHtml;
private recalculateSelectAllCheckboxState;
}
export {};