import { InjectionToken, PipeTransform } from '@angular/core'; import { KbqLocaleService, KbqNumberFormatOptions } from '../../locales'; import * as i0 from "@angular/core"; export declare const KBQ_NUMBER_FORMATTER_OPTIONS: InjectionToken; export declare const KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS: ParsedDigitsInfo; /** Formats a number value according to locale and formatting options */ export declare function formatNumberWithLocale(value: unknown, formatter: Intl.NumberFormat, options?: KbqNumberFormatOptions): string; /** * Special contract between `KbqDecimalPipe` and `KbqTableNumberPipe`, * so they can be interchangeable in the cases of usage */ export interface KbqNumericPipe { transform(value: unknown, digitsInfo?: string, locale?: string): string | null; } export declare const NUMBER_FORMAT_REGEXP: RegExp; interface RoundDecimalOptions { separator: string; groupSeparator: string; thousands?: string; tenThousand?: string; million?: string; oneHundredMillions?: string; billion?: string; trillion: string; rtl?: boolean; } declare class ParsedDigitsInfo { useGrouping: boolean; minimumIntegerDigits: number; minimumFractionDigits: number; maximumFractionDigits: number; } export declare class KbqDecimalPipe implements KbqNumericPipe, PipeTransform { private id; private localeService; private readonly options; constructor(id: string, localeService: KbqLocaleService, options: ParsedDigitsInfo); /** * @param value The number to be formatted. * @param digitsInfo Decimal representation options, specified by a string * in the following format:
* {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}. * - `minIntegerDigits`: The minimum number of integer digits before the decimal point. * Default is `1`. * - `minFractionDigits`: The minimum number of digits after the decimal point. * Default is `0`. * - `maxFractionDigits`: The maximum number of digits after the decimal point. * Default is `3`. * @param locale A locale code for the locale format rules to use. * When not supplied, uses the value of `KBQ_LOCALE_ID`, which is `ru` by default. */ transform(value: any, digitsInfo?: string, locale?: string): string | null; isSpecialFormatForRULocale(locale: string, value: number, grouping?: boolean): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export declare class KbqTableNumberPipe implements KbqNumericPipe, PipeTransform { private id; private localeService; private readonly options; constructor(id: string, localeService: KbqLocaleService, options: ParsedDigitsInfo); /** * @param value The number to be formatted. * @param digitsInfo Decimal representation options, specified by a string * in the following format:
* {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}. * - `minIntegerDigits`: The minimum number of integer digits before the decimal point. * Default is `1`. * - `minFractionDigits`: The minimum number of digits after the decimal point. * Default is `0`. * - `maxFractionDigits`: The maximum number of digits after the decimal point. * Default is `3`. * @param locale A locale code for the locale format rules to use. * When not supplied, uses the value of `KBQ_LOCALE_ID`, which is `ru` by default. */ transform(value: any, digitsInfo?: string, locale?: string): string | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export declare function isWithin(startRange: number, endRange: number, valueToCheck: number): boolean; export declare class KbqRoundDecimalPipe implements PipeTransform { private id; private localeService; roundingOptions: RoundDecimalOptions; constructor(id: string, localeService: KbqLocaleService); transform(value: any, locale?: string): any; private calculateDecimal; /** * 2 * 1000 is a number in the interval of [1500...2500) * * 2,0 * 1000 is a number in the interval of [1950...2050) */ private calculatePartsForThousands; private calculateUnit; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export {};