UNPKG

@aurigma/design-atoms-model

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

65 lines (64 loc) 3.85 kB
export declare function mmToPoint(millimeters: number): number; export declare function stringEquals(str1: string, str2: string, ignoreCase?: boolean): boolean; export declare function stringEquals(str1: string, str2: string, options?: { ignoreCase: boolean; }): boolean; export declare function assert(expression: boolean, message?: string): void; export declare function urlCombine(startUrl: string, ...urlParts: string[]): string; export declare function contains(str1: string, str2: string): boolean; declare type equalsBasicType = string | IEqualsReady | boolean | number; declare type equalsType = equalsBasicType | equalsBasicType[]; export declare function equals(obj1: equalsType, obj2: equalsType): any; export declare function arrayEquals(obj1: equalsBasicType[], obj2: equalsBasicType[]): any; export declare function arrayReferenceEquals(obj1: Object[], obj2: Object[]): boolean; export declare function isNullOrEmptyOrWhiteSpace(str: string): boolean; export declare function capitalize(word: string): string; export declare function isValidXml(str: string, fixAmpsEnabled?: boolean): boolean; export declare function getTextFromXml(xmlFormattedText: string, replaceParagraphString?: string): string; export declare function unescapeXml(str: string): string; export declare function escapeXml(str: string): string; export declare function stringFormat(str: string): string; export declare function pushArray<T>(array: T[], pushValues: T[]): void; export declare function getCurrentLineInTextArea(element: HTMLTextAreaElement): string; export declare function flatten<T>(nestedCollec: T[][]): T[]; export declare function createCssDataUri(css: string): string; export declare function measureScrollbar(): number; export declare function getHiddenElemenHeight(el: HTMLElement): number; /** * @param element Element contains twitter bootstrap dropdown * @param getFocusElement Function returns element to be focused after dropdown expand */ export declare function enableMoveDropDownFocus(element: HTMLElement, getFocusElement: () => any): void; export declare function timeout(delay?: number): Promise<void>; export declare const delay: typeof timeout; export declare function getUniqueId(object: Object): string; export declare function getFontNames(text: string): string[]; export declare function assign<T extends Object>(target: T, sources: any[], options?: { deep?: boolean; ignoreNull?: boolean; }): T; export declare function assignProperties<T extends Object>(target: T, propObject: Partial<T>): T; export declare function normalize<T>(paramObject: T, defaults: Partial<T>): T; export interface IEqualsReady { equals(object: Object): any; } export declare function toDashedStyle(camleCase: string): string; export declare function getStringEnumValue(enumObject: Object, enumValue: string): string; export declare function strToInt(str: string): number; export declare function localStorageEnabled(): boolean; /** * @deprecated The method should not be used. User ImageUtils.getImageSizeByUrl from design-atoms module. */ export declare function getImageSize(imageUrl: string): Promise<{ width: number; height: number; }>; export declare function stripForJson(obj: any, omitProperties?: string | string[]): {}; export declare function isFocused(element: Element): any; export declare function getExtension(fileName: string): string; export declare function getNameWithoutExtension(fileName: string): string; export declare function applyNullableValue<T>(actual: T, redefined: T): T; export declare function applyUndefinedValue<T>(actual: T, redefined: T): T; export declare function getLastPathSegment(path: string): string; export declare function parsePercentOrPointValue(point: string | number, printAreaSize: number): number; export {};