import { ChromaHashService } from '@al/ng-generic-components'; import * as i0 from "@angular/core"; export declare type MatchType = 'pcre' | 'search' | 'selection'; export interface MatchingIds { invert?: boolean; notMatch?: { [s: string]: boolean; }; idTable: { [s: string]: boolean; }; idTable2: { [s: string]: number; }; numIds: number; deduplicatedCount: number; A: number; B: number; C: number; } export interface StringSearchObj { textColor?: string; color?: string; matchingIds?: MatchingIds; decorations?: string; description?: string; enabled: boolean; term: string; searchMode: 'String' | 'Regex' | 'Glob' | 'Hex'; invert?: boolean; } export interface QuickSearch { text: string; active: boolean; counter: number; regex: RegExp; } export interface Match { scrollTo?: () => void; selected?: boolean; textColor?: string; color?: string; matchIndex?: number; start: number; length: number; end: number; keys: string[]; matched: string; type: MatchType; } export declare class HighlightTextService { protected colors: ChromaHashService; constructor(colors: ChromaHashService); /** * Sorts matches in ascending order * @param {Match} a * @param {Match} b * @returns {number} */ sortMatches(a: Match, b: Match): number; /** * Function used to find all matches in a text by using a regex * @param keyWord * @param regexp * @param text * @returns {Match[]} */ getMatches(keyWord: string, regexp: RegExp, text: string, type: MatchType, options?: StringSearchObj): Match[]; getEscaped(mode: string, term: string): string; makeRegex(mode: string, term: string): string; /** * Function used to remove overlapping/redundant problems in the matches * @param matches * @returns {Match[]} */ removeOverlaping(matches: Match[]): Match[]; removeOverlaping2(inputString: string, matches: Match[]): Match[]; /** * Converts a hex expression to string * @param {string} hexStr * @returns {string} */ hexToString(hexStr: string): string; /** * Converts a string in its hex expression * @param {string} str * @returns {string} */ stringToHex(str: string): string; /** * Highlights each matched value in the input string * @param {number} contentIndex * @param {string} inputString * @param {Match[]} matches * @returns {string} */ highlihtMatches(contentIndex: number, inputString: string, matches: Match[]): string; hexConvert(renderThis: Match[], grouping?: number): Match[]; buldFullRenderMatch(inputString: string, options: StringSearchObj[], quickSearchItems?: QuickSearch[], pcreActive?: boolean, pcre?: Array<{ str: string; regex: RegExp; }>, syncHex?: { start: number; end: number; }): Match[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }