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.

72 lines (71 loc) 4.21 kB
export { /** @deprecated use from @aurigma/utils-js */ intersection } from "@aurigma/utils-js"; 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 urlCombine(startUrl: string, ...urlParts: string[]): string; export declare function contains(str1: string, str2: string): boolean; type equalsBasicType = string | IEqualsReady | boolean | number; type equalsType = equalsBasicType | equalsBasicType[]; export declare const equals: (obj1: equalsType, obj2: equalsType) => boolean; /** @deprecated use arrayIsEquals from `@aurigma/utils-js/algorithms/array` */ export declare function arrayEquals(obj1: equalsBasicType[], obj2: equalsBasicType[]): boolean; 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 getCurrentLineInTextArea(element: HTMLTextAreaElement): string; /** @deprecated use native JS array flatten */ 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, def: Partial<T>): T; export interface IEqualsReady { equals(object: Object): boolean; } 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 declare function isString(value: any): value is string; export declare function isNumber(value: any): value is number; export declare function isEmpty<T>(value: T): boolean; export declare function isEqual(a: any, b: any): boolean; export declare const isObject: (value: any) => boolean;