@o3r/components
Version:
This module contains component-related features (Component replacement, CMS compatibility, helpers, pipes, debugging developer tools...) It comes with an integrated ng builder to help you generate components compatible with Otter features (CMS integration
62 lines • 2.44 kB
TypeScript
export interface OtterLikeComponentInfo {
/** Container information */
container?: OtterLikeComponentInfo;
/** Configuration ID */
configId?: string;
/** Component name */
componentName: string;
/** Component translation */
translations?: Record<string, string[]>;
/** Component analytics */
analytics?: Record<string, string[]>;
}
/**
* Otter inspector css class
*/
export declare const INSPECTOR_CLASS = "otter-devtools-inspector";
/**
* Determine if a node is an Otter container
* @param node Element to check
* @returns true if the node is an Otter container
*/
export declare const isContainer: (node: Element | undefined | null) => node is Element;
/**
* Determine the config id of a component instance
* @param instance component instance
* @returns the config id of the component instance
*/
export declare const getConfigId: (instance: any) => any;
/**
* Recursive method to determin the translations of a node
* @param node HTMLElement to check
* @param rec recursive method
* @returns the trasnslations associated to their component name
*/
export declare function getTranslationsRec(node: Element | null, rec: typeof getTranslationsRec): Record<string, string[]> | undefined;
/**
* Determine the translations of a node
* @param node HTMLElement to check
* @returns the translations associated to their component name
*/
export declare const getTranslations: (node: Element | null) => Record<string, string[]> | undefined;
/**
* Recursive method to determine the analytics of a node
* @param node Element to check
* @param rec recursive method
* @returns the analytics associated to their component name
*/
export declare function getAnalyticEventsRec(node: Element | null, rec: typeof getAnalyticEventsRec): Record<string, string[]> | undefined;
/**
* Determine the analytics of a node
* @param node Element to check
* @returns the analytics associated to their component name
*/
export declare const getAnalyticEvents: (node: Element | null) => Record<string, string[]> | undefined;
/**
* Determine all info from an Otter component
* @param componentClassInstance component instance
* @param host HTML element hosting the component
* @returns all info from an Otter component
*/
export declare const getOtterLikeComponentInfo: (componentClassInstance: any, host: Element) => OtterLikeComponentInfo;
//# sourceMappingURL=otter-inspector.helpers.d.ts.map