import * as i0 from "@angular/core"; /** * UtilsService exports all the methods that provides some common utility. * * @export * @class UtilsService * @typedef {UtilsService} */ export declare class UtilsService { constructor(); /** * Replaces all upperCase letters to lowercase precided with '-' dash * @param str * @returns dashed string */ camelCaseToDashCase(str: string): string; /** * Joins the Url segments and forms a url, stripes out any trailing extra slashes from the segments before joing them. * @param urlSegments * @returns joined Urls */ joinUrl(urlSegments: Array): string; /** * Returns the current Date from browser in the ISO format. * * @public * @readonly * @type {string} */ get currentDate(): string; /** * Returns a local date string * @date 26/2/2022 - 9:48:21 am * * @public * @param {string} date * @returns {string} */ dateToLocalString(date?: string): string; /** * Converts ISOString date string to its equivalent time in milliseconds since 1970, returns numeric value as a string. * @date 12/28/2022 - 6:04:39 PM * * @public * @param {string} dateStr * @returns {string} */ dateStringToTotalTimeString(dateStr: string): string; /** * Converts total time in milliseconds since 1970 (numbered string) to its equivalent ISOString date string. * @date 12/28/2022 - 6:04:39 PM * * @public * @param {string} timeStr * @returns {string} */ totalTimeStringToUTCdateString(timeStr: string): string; /** * Stripe out all special characters from the string too except A-Z, a-z, 0-9. * @date 2/12/2023 - 2:01:20 PM * * @public * @param {string} str * @returns {string} */ getStringWithNoSpecialChars(str: string): string; /** * Trims out additional consecutive spaces from a string, also trims spaces from end of the string. * @date 2/12/2023 - 9:54:48 PM * * @public * @param {string} str * @returns {string} */ trimConsecutiveSpaces(str: string): string; /** * Converts a string into dashed string. All spaces are replaced with dashes. * This converted string can be used for getting a unique name for a title of any content like, article etc. * * @param title * @returns */ toDashedString(title?: string): string; /** * Scrolls the page to the desired top position. * @date 25/2/2022 - 5:28:11 pm * * @public * @param {number} top */ scrollTo(top?: number): void; getTrimmedStringByChars(str: string, count?: number): string; /** * Generates a unique ID from a string by adding dashes for spaces and adding a unique string. * @date 14/4/2022 - 2:39:05 pm * * @public * @param {string} [str=''] * @returns {string} */ getUniqueFromString(str?: string): string; /** * Deep copy an object or an array * @date 2/28/2023 - 3:22:38 AM * * @public * @param {(any)} value * @returns {(any)} */ deepCopy(value: any): any; delay(miliseconds: number): Promise; /** * Generates Image source urls to be displayed from API. * Note: Do not provide base url, while saving urls to db, but while displaying only. * @date 6/4/2023 - 12:27:34 AM * * @public * @param {string} imageFullPath * @param {string} imageApiEndpoint * @param {string} [baseUrl=''] * @returns {string} */ getImageUrl(imageFullPath: string, imageApiEndpoint: string, baseUrl?: string): string; /** * Generates the canonical categiry or article url. * Note: Do not provide base url, while saving urls to db, but while displaying only. * @date 6/4/2023 - 12:17:52 AM * * @public * @param {string} categoryid * @param {string} [articleId=''] * Provide only when displaying the url, and not while saving to db. * @param {string} [baseUrl=''] * @returns {string} */ getCanonicalUrl(categoryid: string, articleId?: string, baseUrl?: string): string; /** * Replaces single quotes in a string with double quotes. * @param str * @returns */ replaceSingleWithDoubleQuotes(str: string): string; /** * Strips out starting and ending single/double quotes from a string. * @param str * @returns */ stripsOutQuotesFromStartAndEnd(str: string): string; /** * Gives a natural comma separetd string from an array of strings. * Last comma in the string is replaced with 'and', being a natural language string. * @param stringArray * @returns string */ nauturalJoinArray(stringArray: Array): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }