UNPKG

@studiohyperdrive/ngx-utils

Version:

A series of abstracts, utils, pipes and services for Angular applications.

22 lines (21 loc) 1.21 kB
import { PipeTransform } from '@angular/core'; import { NgxHighlightConfiguration } from '../../types'; import * as i0 from "@angular/core"; export declare class NgxHighlightPipe implements PipeTransform { /** * Highlights the provided substring of a text with a chosen dom element * * @param value - The full text with the part we wish to highlight * @param highlight - The part of the text we wish to highlight * @param config - The configuration to determine if we want to normalize the values, to be case-sensitive, which tag and/or class to use for the highlight * @param config.normalized - Default = true * @param config.caseInsensitive - Default = true * @param config.splitTextToHighlight - Default = false * @param config.someOrEveryMatch - Default = 'every' * @param config.tag - Default = 'mark' * @param config.highlightClass - Default = 'ngx-mark-highlight' */ transform(value: string | null, highlight: string | null, config?: NgxHighlightConfiguration | null): string; static ɵfac: i0.ɵɵFactoryDeclaration<NgxHighlightPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<NgxHighlightPipe, "highlight", true>; }