/** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Angular */ import * as ng from "@angular/core"; export interface Item { key: string; value: any; title: string; type: string; isOpened: boolean; isObject: boolean; } /** * @whatItDoes * * This component displays a JSON object in a debug-like mode. * * It allows to navigate through the object and its inner objects. * Functions and complex values will be treated as display-only. * * @howToUse * * ### Inputs * `any` : **json** - The JSON or object to be displayed * `boolean` : **scroll** - Enable or disable the scroll. By default is enabled. * * ### Outputs * There are no outputs * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * ``` * * ```Typescript * json: any = {text: "text", array: [{pos1: "pos1"}, 2], fn: function() {}} * ``` * * @description */ export declare class JsonViewer extends CoreComponent implements ng.OnChanges { /** * Enables or disables the scroll bar. */ scroll: boolean; /** * Json object to be displayed */ json: Array | Object | any; /** * Json object (asset) already processed to be displayed in the template */ asset: Array; /** * Constructor * * @param viewContainerRef the reference to the component view container */ constructor(viewContainerRef: ng.ViewContainerRef); /** * Check value and Create item object * @param {string|any} key * @param {any} value */ private createItem; /** * Check item's type for Array or Object * @param {Item} item * @return {boolean} */ private isObject; /** * Handle click event on collapsible item * @param {Item} item */ clickHandle(item: Item): void; /** * On changes method * * @param changes the changes made to the component properties */ ngOnChanges(changes: ng.SimpleChanges): void; } export declare class JsonViewerModule { }