UNPKG

@covalent/core

Version:

Core Teradata UI Platform for layouts, icons, custom components and themes. This should be added as a dependency for any project that wants to use layouts, icons and themes for Angular Material.

89 lines (85 loc) 2.98 kB
import * as i0 from '@angular/core'; declare class TdJsonFormatterComponent { private _changeDetectorRef; private _dir; /** * Max length for property names. Any names bigger than this get trunctated. */ private static KEY_MAX_LENGTH; /** * Max length for preview string. Any names bigger than this get trunctated. */ private static PREVIEW_STRING_MAX_LENGTH; /** * Max tooltip preview elements. */ private static PREVIEW_LIMIT; private _key?; private _data; private _children?; private _open; private _levelsOpen; /** * levelsOpen?: number * Levels opened by default when JS object is formatted and rendered. */ set levelsOpen(levelsOpen: number); get levelsOpen(): number; get open(): boolean; /** * key?: string * Tag to be displayed next to formatted object. */ set key(key: string); get key(): string; /** * data: any * JS object to be formatted. */ set data(data: Record<string, any>); get data(): Record<string, any>; get children(): string[]; get isRTL(): boolean; /** * Refreshes json-formatter and rerenders [data] */ refresh(): void; /** * Toggles collapse/expanded state of component. */ toggle(): void; isObject(): boolean; isArray(): boolean; hasChildren(): boolean; /** * Gets parsed value depending on value type. */ getValue(value: any): string; /** * Gets type of object. * returns 'null' if object is null and 'date' if value is object and can be parsed to a date. */ getType(object: any): string; /** * Generates string representation depending if its an object or function. * see: http://stackoverflow.com/a/332429 */ getObjectName(): string; /** * Creates preview of nodes children to render in tooltip depending if its an array or an object. */ getPreview(): string; private parseChildren; static ɵfac: i0.ɵɵFactoryDeclaration<TdJsonFormatterComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TdJsonFormatterComponent, "td-json-formatter", never, { "levelsOpen": { "alias": "levelsOpen"; "required": false; }; "key": { "alias": "key"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, {}, never, never, true, never>; } /** * @deprecated This module is deprecated and will be removed in future versions. * Please migrate to using standalone components as soon as possible. */ declare class CovalentJsonFormatterModule { static ɵfac: i0.ɵɵFactoryDeclaration<CovalentJsonFormatterModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<CovalentJsonFormatterModule, never, [typeof TdJsonFormatterComponent], [typeof TdJsonFormatterComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<CovalentJsonFormatterModule>; } export { CovalentJsonFormatterModule, TdJsonFormatterComponent };