import { PersianService } from './persian-service'; import * as i0 from "@angular/core"; /** * IsPersian options parameter object should implement this interface. Fields descriptions are in the isPersian method document. */ export interface PLOptions { persianDigits?: boolean; enDigits?: boolean; symbols?: boolean; whitespaces?: boolean; } export declare class PersianLetterService implements PersianService { static PERSIAN_LETTERS_PATTERN: string; static WHITESPACES_PATTERN: string; private static SYMBOLS_PATTERN; /** * According to the options values, returns a RegExp object. The regex pattern of it contains regex of finding each of * elements those specified in the options object plus persian letters. * * @return a RegExp object that can use in searching a string for special characters (persian letters and others specified in the options) * @param options */ private static _stringValidationRegex; /** * This method gets regex of persian letters and other chars specified in the options and then splits the input value by that regex. * * If match result is null - there is no match - returns 0. otherwise returns length of the match array that shows number of matched * occurred in the input value. * * @param value * @param options * @return a number greater equal to 0 representing number of matches occurred in the input value. */ private static _getMatchedPatternLength; /** * If input value contains any persian letter or is an empty string, returns true. otherwise returns false. * * @param value */ containsPersian(value: string): boolean; /** * Checks if input value is a persian text or not. If input value contains any letter that is not persian, the output will be false. * Result of validation on existence of other characters controls by options parameter. * * @param value * @param options controlling validation result on existence of other characters controls by options parameter. Fields: * * persianDigits: if sets to true, validation result will be true if input value contains persian digits plus persian letters. * * * enDigits: if sets to true, validation result will be true if input value contains english digits plus persian letters * * * symbols: if sets to true, validation result will be true if input value contains specific symbols plus persian letters. * symbols list: ?$-/:؟!~"'^_-[]{}()%&*><; * * * whitespaces: if sets to true, validation result will be true if input value contains white spaces plus persian letters * * * You can combine any number of options field together. */ isPersian(value: string, options?: PLOptions): boolean; /** * Converts arabic letters: ي and ك to persian corresponding letters. * * @param value */ toPersian(value: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }