@rdkmaster/jigsaw-labs
Version:
Jigsaw, the next generation component set for RDK
58 lines (57 loc) • 1.87 kB
TypeScript
import { TranslateService } from "@ngx-translate/core";
import { CallbackRemoval } from "./common-utils";
/**
* @internal
*/
export declare class InternalUtils {
static uedSiteHost: string;
static _uniqueIdIndex: number;
static _defaultPrefix: string;
static initTrackItemBy(trackItemBy: string, labelField: string): string[];
static createUniqueId(prefix?: string): string;
private static _initI18nWithLang(translateService, compName, translations, lang);
static initI18n(translateService: TranslateService, compName: string, translations: Object): void;
/**
* 驼峰转短横线分隔命名
* @param {string} prop
* @returns {string}
*/
static camelToKebabCase(prop: string): string;
/**
* 短横线分隔转驼峰命名
* @param {string} prop
* @returns {string}
*/
static kebabToCamelCase(prop: string): string;
static randomNumber(min: any, max: any, isFloat?: boolean): number;
}
/**
* 用于获取dom元素的位置信息
* @internal
*/
export declare class AffixUtils {
static offset(elem: any): any;
static getScrollTop(): number;
static getWindow(elem: any): any;
static isWindow(obj: any): boolean;
static getDocumentBody(): HTMLElement;
}
/**
* @internal
*/
export declare class ElementEventHelper {
private _eventCaches;
put(element: HTMLElement, eventType: string, eventListener: CallbackRemoval): void;
get(element: HTMLElement, eventType: string): CallbackRemoval[];
del(element: HTMLElement, eventType: string, eventListener?: CallbackRemoval): void;
private _findEventCache(element, type);
}
/**
* 事件存储及事件服务
* @internal
*/
export declare class ElementEventCache {
element: HTMLElement;
type: string;
handles: CallbackRemoval[];
}