UNPKG

nxt-json-view

Version:
38 lines (33 loc) 1.81 kB
import * as i0 from '@angular/core'; import { AfterViewChecked } from '@angular/core'; interface LevelLabels { [level: number]: { [key: string]: string; }; } declare class JsonViewComponent implements AfterViewChecked { /** JSON data, any valid JSON object */ readonly data: i0.InputSignal<any>; /** Initial number of levels to be expanded; to expand / collapse the view after initial render, use `expandTo` / `collapseTo` */ readonly levelOpen: i0.InputSignal<number | undefined>; /** Custom labels for elements within the hierarcy */ readonly levelLabels: i0.InputSignal<LevelLabels | undefined>; /** @internal */ readonly _levelOpen: i0.WritableSignal<number | undefined>; private readonly expanderService; ngAfterViewChecked(): void; /** Expand all items up to the given level */ expandTo(level: number): void; /** Collapse any open items above the given level */ collapseTo(level: number): void; static ɵfac: i0.ɵɵFactoryDeclaration<JsonViewComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<JsonViewComponent, "nxt-json-view", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "levelOpen": { "alias": "levelOpen"; "required": false; "isSignal": true; }; "levelLabels": { "alias": "levelLabels"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } /** @deprecated use standalone imports */ declare class JsonViewModule { static ɵfac: i0.ɵɵFactoryDeclaration<JsonViewModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<JsonViewModule, never, [typeof JsonViewComponent], [typeof JsonViewComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<JsonViewModule>; } export { JsonViewComponent, JsonViewModule }; export type { LevelLabels };