import { ElementRef } from "@angular/core"; import { AbstractControl, FormBuilder, FormControl, FormGroup } from "@angular/forms"; import { DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from "@angular/platform-browser"; import { DateItem } from "../../features"; import { MediaUploadErros } from "../../features/mediamanager/mediamanager.interfaces"; import { FileSource, LabelValue, MultiLangData } from "../../interfaces"; import { CfFormBuilder, CfFormControl, CfFormGroup } from "../classes"; import { CfFormControlType, CfFormControlTypeValueMap } from "../classes/form/formcontrol"; export declare function isStringArray(values: any[]): boolean; export declare function isNumberArray(values: any[]): boolean; /** * Convert any array to LabelValue if it contains only `strings` or `numbers` * @param values any[] * @returns `LabelValue[]` */ export declare function convertValues(values: any[]): LabelValue[]; export declare function getPath(element: Element): Element[]; export declare function isOuter(elements: (Element | ElementRef | undefined)[], event: PointerEvent | MouseEvent | FocusEvent): boolean; export declare function inPath(element: Element, event: PointerEvent | MouseEvent | WheelEvent): boolean; export declare function dateIsValid(date: Date): boolean; export declare function dateSame(a: Date | null, b: Date | null): boolean; export declare function inDate(a: Date, b: Date[]): boolean; export declare function dateGt(a: Date, minDate: Date | null): boolean; export declare function dateLt(a: Date, minDate: Date | null): boolean; export declare function dateBetween(a: Date, minDate: Date, maxDate: Date): boolean; export declare function getCalendarDrawDates(date: Date, selectedDate: Date | null, today: Date | null, minDate: Date | null, maxDate: Date | null, disabledDates: Date[]): DateItem[]; export declare function replaceAll(input: string, find: string, replace: string): string; export declare function convertToThousandSeparator(input: number | string, thousandSeparator?: string, decimalSign?: string): string; export declare function convertToCurrency(input: number | string, currency: string): string; export declare function selectIndexMinMax(actualIndex: number, mode: 'up' | 'down', max: number, min?: number): number | null; export declare function randomIntFromInterval(min: number, max: number): number; export declare function safeHtml(domSanitizer: DomSanitizer, input: string): SafeHtml; export declare function safeStyle(domSanitizer: DomSanitizer, input: string): SafeStyle; export declare function safeScript(domSanitizer: DomSanitizer, input: string): SafeScript; export declare function safeUrl(domSanitizer: DomSanitizer, input: string): SafeUrl; export declare function safeResourceUrl(domSanitizer: DomSanitizer, input: string): SafeResourceUrl; export declare function classes(classes: { [key: string]: boolean; }): string; /** * Escape characters that have a special meaning in Regular Expressions **/ export declare function escapeRegExp(s: string): string; /** * Transforms a string into a number (if needed). */ export declare function strToNumber(value: number | string | null): number | null; /** * Append to body */ export declare function appendToBody(element: HTMLElement): void; export declare function setElementRect(inputElement: HTMLElement, element: HTMLElement, width: string | null, height: string | null): void; export declare function generateUuid(): string; export declare function arraySwitch(inputArray: T[], oldPosition: number, newPosition: number): T[]; export declare function arrayMove(inputArray: T[], oldPostition: number | null, newPosition: number | null, data?: T | undefined): T[]; export declare function localStorage(): Storage | null; export declare function webSocket(url: string, protocols?: string | string[]): WebSocket | null; export declare function sessionStorage(): Storage | null; export declare function isBrowser(): boolean; export declare function createMultilangFormGroup(languages: string[] | LabelValue[], fb: FormBuilder, value: T | MultiLangData, multilangDataPassed?: boolean): FormGroup<{ [key: string]: FormControl; }>; export declare function createMultilangCfFormGroup(cffb: CfFormBuilder, type: TType, languages: string[] | LabelValue[], value: CfFormControlTypeValueMap[TType] | MultiLangData, multilangDataPassed?: boolean, resetCfFormControlPermanentTags?: boolean): CfFormGroup<{ [key: string]: CfFormControl; }>; export declare function createMultilangCfFormGroupTyped(cffb: CfFormBuilder, languages: string[] | LabelValue[], value: T | MultiLangData, multilangDataPassed?: boolean, resetCfFormControlPermanentTags?: boolean): CfFormGroup<{ [key: string]: CfFormControl; }>; export declare function getFileUri(source: FileSource): Promise; export declare function downloadFile(source: FileSource): Promise; export declare function processMediaManagerFormData(abstractControl: AbstractControl, formData: FormData): void; export declare function createMediaManagerFormData(formGroup: FormGroup, formData?: FormData | null): FormData; export declare function distanceNumbers(a: number, b: number): number; export declare function onlyUnique(value: T, index: number, array: T[]): boolean; export declare function min(input: number[]): number; export declare function max(input: number[]): number; export declare function sum(input: number[]): number; export declare function findMediaUploadResultErrorControls(startControl: AbstractControl, mediaUploadErros: MediaUploadErros, controls?: AbstractControl[]): AbstractControl[]; export declare function minMax(input: number, min: number, max: number): number;