import { NgbModal } from "@ng-bootstrap/ng-bootstrap"; import { TranslateService } from "@ngx-translate/core"; import { EquipmentDocument, LevelStatus, Locale, Mission, PoiType, RoleStatus } from "./types.service"; export declare function getDistanceBetweenTwoPoints(startPoint: any, endPoint: any): number; export declare function poiTypeToString(type: PoiType): string; export declare function wait(timeout: number): Promise; export declare const waitUntil: (condition: () => boolean) => Promise; export declare function enumToArray(enumerable: any): any[]; export declare function getLevelsBelow(level: LevelStatus): LevelStatus[]; export declare function getHighestLevelForMissions(missions: Mission[]): LevelStatus; export declare function getHighestRoleForMissions(missions: Mission[]): RoleStatus; export declare function getRolesBelowForManager(role: RoleStatus): RoleStatus[]; export declare function filterUniqueArrayByID(arrayOfObjects: any[]): any[]; export declare function removeNullKeysFromObject(object: Object): void; /** * Test if a date has expired * @param date * @returns true if the date has expired, false otherwise */ export declare function dateHasExpired(date: string | Date | number | null | undefined): boolean; export declare function stringLocaleToEnum(locale: string): Locale; export declare function getMetaForImage(url: any): Promise; export declare function sortAlphabeticallyOnName(array: { name: string; }[]): any[]; export declare function validEmail(email: string): boolean; export declare function downloadBlob(blob: any, filename: any): HTMLAnchorElement; export declare function openModalForVisitSwitch(modalService: NgbModal, model3D: string, spaceID: string, dataToMove?: { sweepToMove: string; rotation: any; } | null): void; /** * Return a string of a given date time in local format. * The format is determined by the current language. */ export declare function dateTimeToLocalString(date: number | string | Date, translate?: TranslateService, mode?: any): string; /** * Compares two string arrays * @param array1 * @param array2 * @returns */ export declare function arraysContainSameElements(array1: string[], array2: string[]): boolean; export declare function getVisitUrl(currentUrl: string): string; /** * Extract spaceID from url when in visit 3D */ export declare function getSpaceIDFromUrl(url: string): string; export declare function downloadFile(fileUrl: string, fileName: string): void; export declare function openDocument(fileUrl: string, fileName: string, id: number): void; export declare const downloadEquipmentDocument: (document_: EquipmentDocument) => Promise; export declare function checkElementById(selector: any): Promise; export declare function mean(numbers: number[]): number; export declare function convertTimestampToLocalZone(timestamp: number): number; /** * Return string for period of time. Parameters are DateTime objects of luxon library. */ export declare function translateDatePeriod(translateService: any, dateStartPeriod: any, dateEndPeriod: any): string; /** * Return local in the canonical form: "en-GB", "fr-FR" */ export declare function getLocaleLong(translate: TranslateService): string; /** * Return local in the short form: "en", "fr" */ export declare function getLocaleShort(translate: TranslateService): string; /** * Format string to lowercase, no spaces */ export declare function stringToLowercaseNoSpaces(input: string): string; /** * Test if the object === {} * @param obj object {key:value} * @returns boolean */ export declare function isEmptyObject(object: any): boolean; export declare function shuffleArray(array: any[]): any[]; export declare function numberToDateString(timestamp: number): string; export declare function durationToString(duration: number, translate: TranslateService): string;